Tory Lanez told Megan Thee Stallion to "dance" before allegedly shooting at her feet, a court has heard.
The rapper, whose real name is Daystar Peterson, is accused of shooting Megan after a party in the Hollywood Hills on 12 July 2020.
Rapper Megan, 26, and Tory, 29, got into an argument while driving away from the event hosted by Kylie Jenner, news agency AFP reported.
Megan, whose real name is Megan Pete, demanded to be let out of the car and then heard Tory shout "dance, b***h" as he opened fire with a handgun, Los Angeles Police Department Detective Ryan Stogner told a judge on Tuesday.
The singer told police she was "bleeding profusely" from her feet and that she fell to the ground and crawled to a nearby driveway, AFP reported.
Tory then "emphatically apologised for what he did" and offered to drive her home, the court heard, with the rapper later telling officers he had offered her money to not say anything about the shooting.
Megan initially told police she had injured her feet by stepping on broken glass after the party, the Los Angeles Times said.
She told Stogner she was "scared [Tory] was going to get in trouble", but later alleged that he had shot her.
Megan posted on Instagram that she had been shot by Tory, but many of the tracks on his album, Daystar, claim he's being framed.
At Tuesday's hearing a judge refused a defence application to dismiss the charges.
The next hearing will take place on 13 January.
Tory faces up to 23 years in prison if convicted.