12:01 PM PT -- The judge just sided with Tran ... ordering the restraining order stay in place for the next 5 years.
Chris Brown threatened violence against his ex-GF after they broke up, demanding she give back money and gifts he had given her during their relationship ... this according to Karrueche Tran's in-person testimony in court.
Karrueche took the stand Thursday in her restraining order case against Chris, telling a judge after she broke up with the singer ... he demanded diamond rings he bought for her to be returned. When she refused ... Karrueche says Chris became aggressive.
Karrueche explained that in text messages between herself and Chris post-breakup, he would say things like "I'm not being nice to you no more, if I see you out in public again and I'm there I will make you hate me even more, don't be anywhere I'm out in public, I'm going to ban you from all events."
She claims he also texted her more violent threats like ... "I can get my money back and I'm tired of playing games" as well as "Bitch I will beat the s**t out of you" and "I promise you I will make your life hell." She says he also once wrote "Imma kill blood" under a photo of her and actor Michael B. Jordan.
Chris Brown's attorney, David Gammill, grilled Karrueche on cross-examination, and pressed her on allegedly taunting Chris about the rings by saying she had sold them. Karrueche told Gammill she never planned to return the rings because they were hers. Gammill also brought up the point of Karrueche never reporting any of the alleged behavior to authorities.
Karrueche insists she fears for her safety and needs permanent protection. Chris wasn't in court today and the judge refused to let him join the hearing via phone.