Updated

A Superior Court commissioner decided Monday to keep in effect an earlier order suspending Britney Spears' right to visit her two sons and keeping them in ex-husband Kevin Federline's custody.

The ruling by Commissioner Scott Gordon came after a full day of testimony on a bizarre incident earlier this month in which police had Spears taken to a hospital after a standoff in her home when she refused to return the children to Federline's bodyguard after a visit.

Gordon scheduled another hearing for Feb. 19.

Spears came to the courthouse briefly during the afternoon but never went inside. Instead, she left in a swarm of paparazzi.

The hearing in family law court was held behind closed doors after reporters were ordered to leave.

Court spokesman Allan Parachini said those who testified were two Los Angeles police officers; Paula Strong, the court-appointed monitor who was present for the visit at Spears home; Lisa Hacker, a parenting coach who has been working with Spears and Federline; and Lonnie Jones, the bodyguard who went to the home to get the children.

Parachini did not reveal what the witnesses said during their testimony.

Federline's attorney, Mark Vincent Kaplan, told reporters that after hearing all the testimony the commissioner decided to leave his Jan. 4 emergency order in place.

"The word victory is not something Mr. Federline or his counsel would ascribe to this. There is no joy. This is a grave situation for all," Kaplan said.

He said that although Federline thought the ruling was correct, "his goal, his hope for the future is at some point he will be able to parent the children with the participation of their mother."

Kaplan would not answer questions.

Neither Spears nor Federline were required to be present, but Federline arrived early, sporting a mohawk-style haircut and dressed in a suit.

Spears didn't arrive until early afternoon.

An SUV brought her into a civic center garage but only her attorneys got out before the vehicle left. It later stopped outside the courthouse, where Spears got out of a passenger seat and took over the driver's seat. It was not clear in the crush of photographers whether she or a companion was at the wheel when it left.

Gordon scheduled Monday's hearing at the same time he issued a Jan. 4 order suspending Spears' monitored visits with son Jayden James, 1, and Sean Preston, 2, and giving full legal and physical custody to Federline, who previously had temporary custody.

Gordon issued that order the day after police were called to Spears' home when she refused to return the children to Federline after a monitored visit and officers had paramedics haul the pop star off to a hospital for undisclosed reasons. She was released after a day and a half in Cedars-Sinai Medical Center.

Police officers monitoring the paparazzi outside the courthouse warned them to stay on the sidewalk, and several were issued citations by bicycle-mounted officers for being in the street.