Tory Lanez was ordered by a judge to be placed on electronic monitoring and house arrest while he waits for the trial against him for shooting Megan Thee Stallion's feet in 2020.

This comes after Superior Court Judge David Herriford rejected the prosecution's motion seeking the rapper to be taken into custody without bail, reports say.

They also noted that the 30-year-old rapper poses a danger to public safety and has a history of defying court orders. They cited Lanez's alleged attack on a Chicago man just the previous month.

On the other hand, Lanez's defense lawyer, Shawn Holley, countered that the incident in Chicago is based on "mere allegations" and that "these allegations are disputed," as there had been no case filed for that incident.

Finally, the judge opted to have Lanez will be on house arrest with a GPS monitor on his ankle. His house arrest will be effective on Oct. 28.

After knowing about the judge's ruling, Lanez reacted, saying that "the ruling was a perfect example of how the criminal justice system treats Black men," as TMZ put it.

READ MORE: Selena Gomez Reveals What Caused Her Depression: 'In My Heart I Know Now Is The Time'

Shooting Incident

According to reports, Megan Thee Stallion came forward with the allegations that Lanez shot her in the foot following a pool party at Kylie Jenner's house in July 2020.

She went on Instagram Live to share her side of the story, claiming that Lanez's publicist was spreading disinformation, "I didn't get cut by no glass, but let me tell you why they're saying that."

"When the police came because the neighbors called the police ... the police come - I'm scared. All this shit going on with the police ... I didn't want to die. I didn't want the police to shoot me cause there's a n***a with a gun in the car with me. [sic]"

By October 2020, the Los Angeles District Attorney's Office charged Lanez with one count of felony assault with a semiautomatic firearm, personal use of a firearm, and carrying a loaded, unregistered firearm. Lanez pleaded not guilty to the charges.

Megan Thee Stallion opened up about the incidents that occurred that night in her interview with Gale King, and she recalled feeling "really scared."

"He started shooting, and I'm just like, 'oh my God.' He shot a couple of times. And I didn't even want to move. I don't want to move too quick like 'cause I'm like 'oh my God' if I take the wrong step, I don't know if he can shoot something that's like super important,'" she said. "I don't know if he could shoot me and kill me. I was really scared because I had never been shot at before. [sic]"

She also revealed that right after the incident, she underwent surgery and was confined in a hospital for about four days.

"I still have bullet fragments in my feet right now. I was very scared that I was not able to be Megan Thee Stallion no more," she added.

When asked about how she felt regarding the entire situation, the 27-year-old rapper said, "I want him to go to jail."

READ ALSO: Ed Sheeran To Film 'Honest' Documentary: Juggling 'Celebrity Baggage' and Home Life

Join the Discussion