Singer Trey Songz performs at the BET Awards at the Microsoft Theater in Los Angeles. Picture: AP

Trey Songz has been banned from going near or contacting his alleged assault victim after she sought a restraining order.

The alleged victim appeared in court on Tuesday to seek a court order preventing the 33-year-old rapper from approaching her or contacting her after he allegedly attacked her in Hollywood Hills, California, on February 17. 

READ: Trey Songz not phased by Keke Palmer's 'accusations'

The woman's lawyer Lisa Bloom took to Twitter afterwards to tweet: "Update: we obtained the restraining order against Trey Songz this morning. There's no excuse for violence against women. It must stop. It stops when when stand with victims."

Prior to receiving the order, Ms. Bloom told the New York Post newspaper that they had no choice but to seek the restraint because it's an ongoing investigation.

She said: "We took this step today to protect my client's rights to peacefully live and work, and we will continue to fully cooperate with law enforcement's investigation of this serious matter. The room was filled with Mr. Songz's friends and employees. We are asking just one of them with a conscience to reach out to us and tell us what they saw. Don't be a bystander to violence against women."

The alleged victim has claimed the singer called her names, choked her and punched her several times in the face at a home Trey had rented for the weekend.

She's alleged the incident happened because the rapper, whom she's been friends with "for years", became angry that she had started talking to another man. 

Ms. Bloom said in a statement: "He called her names, choked her and repeatedly punched her in the face. Several people were present and no one helped her.

"When she took out her phone to call an Uber to get out of there, he threw her phone off a cliff to prevent her from leaving."

The woman sought treatment for her bruised face, arm and back at hospital.