The Canadian rapper, if convicted, faces up to 22 years in prison
Tory Lanez
Tory Lanez
| Credit: Cindy Ord/Getty Images

Tory Lanez has been charged with shooting Megan Thee Stallion earlier this summer.

Lanez (né Daystar Peterson) was charged with one felony count each of assault with a semiautomatic firearm, personal use of a firearm, and carrying a loaded, unregistered firearm in a vehicle for an incident that took place in the Hollywood Hills in July, the Los Angeles County District Attorney’s Office announced Thursday.

Lanez, 28, is also facing a "gun allegation and that he personally inflicted great bodily injury," the DA's office said.

The Canadian rapper will be arraigned on October 13 and if convicted could be sentenced with up to 22 years and eight months in state prison.

Representatives for both rappers did not immediately respond to PEOPLE's requests for comment.

While the DA's office did not identify Megan as the victim, she has spoken out about the shooting multiple times and named Lanez as the alleged shooter in August.

"You shot me, and you got your publicist and your people going to these blogs lying and s—. Stop lying," the "WAP" rapper, 25, said on Instagram Live, as captured by a fan's account on Twitter. "Why lie? I don't understand. I tried to keep the situation off the internet, but you're dragging it."

Megan Thee Stallion
Megan Thee Stallion
| Credit: Aaron Poole/E! Entertainment/NBCU Photo Bank/NBCUniversal via Getty

Lanez was arrested on July 13 and charged with carrying a concealed firearm in a vehicle. He posted his $35,000 bail and was released later that day.

Megan spoke out two days later, saying on Instagram that she "suffered gunshot wounds as a result of a crime that was committed against me and done with the intention to physically harm me."

"I was never arrested, the police officers drove me to the hospital where I underwent surgery to remove the bullets," she said at the time, adding that she is "incredibly thankful to be alive." She has also called the shooting "the worst experience of my life."

RELATED VIDEO: Megan Thee Stallion Says She's 'Hurt' and 'Traumatized' After Being Shot: 'Black Women Are So Unprotected'

Earlier this month, reports surfaced that Lanez apologized to the "WAP" rapper in a text message following the July shooting incident.

In the text messages that he reportedly sent to Megan shortly after the event, Lanez said, "I know u prolly never gone talk to me again, but I genuinely want u to know I'm sorry from the bottom of my heart," and added, "I was just too drunk," TMZ reported.

The outlet also noted that Lanez didn't explicitly mention a shooting or gun in the text message, but that he wrote: "None the less s— should have never happened and I can't change what did. I just feel horrible."

Megan Thee Stallion, Tory Lanez
Megan Thee Stallion and Tory Lanez
| Credit: Getty Images (2)

In an album released last month, Lanez denies shooting Megan.

On the track "Money Over Fallouts," audio clips of the media speaking about the alleged shooting play at the top of the song before Lanez (whose real name is Daystar Peterson) raps, "Megan, people tryin' to frame me for a shootin" and "Gotta see a couple questions: how the f– you get shot in yo foot it don't hit no bones or tendons? How the f— is your team tryna' pay me in millions?"

He later adds, "Girl, you had the nerve to write that statement on an affidavit/Knowing I ain't do it but I'm coming at my truest."

The case is still under investigation by the Los Angeles Police Department, the DA's office said.