Megan Thee Stallion is calling for the protection of Black women in an op-ed published Tuesday as rapper Tory Lanez had his first court hearing on felony charges for allegedly shooting her.

“I was recently the victim of an act of violence by a man,” the female rapper wrote in The New York Times, without naming Lanez. The op-ed was published shortly before a judge released him on bail and ordered him to stay away from her.

“After a party, I was shot twice as I walked away from him," she wrote about the attacker. “We were not in a relationship. Truthfully, I was shocked that I ended up in that place.”

In the piece titled, “Why I Speak Up For Black Women,” the hip-hop star writes that “Black women are still constantly disrespected and disregarded in so many areas of life.”

MEGAN THEE STALLION SAYS RAPPER TORY LANEZ IS THE PERSON WHO SHOT HER

In her first public comments on the matter since Lanez was charged, she explains why, on July 12, the night she was shot in the feet in the Hollywood Hills, she declined to tell police or otherwise publicize that her injuries were from gunfire.

“My initial silence about what happened was out of fear for myself and my friends,” she writes. “Even as a victim, I have been met with skepticism and judgment. The way people have publicly questioned and debated whether I played a role in my own violent assault proves that my fears about discussing what happened were, unfortunately, warranted.”

Lanez, whose legal name is Daystar Peterson, made his court appearance by phone in Los Angeles on charges of assault with a semiautomatic firearm and carrying a loaded, unregistered firearm in a vehicle. He said only, “Yes, your honor” to a series of questions from the judge and did not enter a plea. His arraignment was postponed until Nov. 18.

Lanez's bail was set at $190,000, which was promptly posted, and he was ordered to make no contact with Megan Thee Stallion and to surrender any guns he owns. He has been free since he was briefly jailed after an arrest on suspicion of illegal weapon possession on the day of the shooting.

His attorney Shawn Holley declined comment afterward.

The day after he was charged, Lanez said on Twitter that “the truth will come to the light” and “a charge is not a conviction.”

TORY LANEZ DENIES SHOOTING MEGAN THEE STALLION IN NEW 17-TRACK ALBUM

Rapper Tory Lanez has been charged with assault after allegedly shooting hip-hop star Megan Thee Stallion. 

Rapper Tory Lanez has been charged with assault after allegedly shooting hip-hop star Megan Thee Stallion.  (Wireimage/Getty)

After teasing on Sept. 24 that he might tell his side of the story on social media later that night, he instead released a new album, “Daystar,” which currently sits at No. 10 on the Billboard album chart.

Prosecutors allege Lanez fired on Megan Thee Stallion, whose legal name is Megan Pete, after she got out of an SUV during an argument. If convicted, he could face a maximum sentence of about 23 years.

In her op-ed, she puts her shooting and its aftermath in the context of larger issues for Black women, “who struggle against stereotypes and are seen as angry or threatening when we try to stand up for ourselves and our sisters.”

“We deserve to be protected as human beings,” she writes. “And we are entitled to our anger about a laundry list of mistreatment and neglect that we suffer.”

CLICK HERE TO GET THE FOX NEWS APP

Megan Thee Stallion has had a breakout run in the past two years that has put her among the biggest stars in hip-hop. She was nominated for artist of the year at the MTV Video Music Awards, was the musical guest on the season premiere of “Saturday Night Live,” and her guest stint on the Cardi B song “WAP” helped turn the track — and music video — into a huge cultural phenomenon.

The Associated Press contributed to this report.