Judge David Herriford handed down the sentence to the 30-year-old rapper, whose legal name is Daystar Peterson, during a hearing in Los Angeles Superior Court that had been pushed back by delays, USA Today reported.

On Dec. 23, a jury found Lanez guilty of carrying a loaded and unregistered firearm in a vehicle, assault with a semiautomatic handgun and discharging a firearm with gross negligence.

Lanez was accused of shooting Grammy-winning rapper Megan Thee Stallion, 28, injuring her feet after a pool party in the Hollywood Hills in July 2020.

The shooting was preceded by an argument that became heated when the two began attacking each other's music careers, she told the court during the two-week trial.

Megan Thee Stallion needed surgery and spent four days in the hospital before physical therapy allowed her to walk again, she said during an interview with Rolling Stone magazine.

"I was very scared that I was not able to be Megan Thee Stallion no more," said the Houston artist, whose real name is Megan Pete.

Megan Thee Stallion won Grammy awards for best new artist, best rap performance and best rap song in 2021. She has also been nominated for six more.

Los Angeles County District Attorney George Gascon said in a statement after December's verdict that women, especially Black women, are afraid to report crimes such as assault and sexual violence because they are too often not believed.

(Reporting by Jane Ross in Los Angeles and Jonathan Allen in New York; Writing by Brendan O'Brien; Editing by Aurora Ellis)