Conrad Hilton exploded in anger during his arraignment Wednesday, saying in the courtroom, "So f***ing gay."

Hilton did not enter a plea to violating a restraining order by trying to break into the home of his ex-girlfriend over the weekend. While our camera mic didn't pick up the homophobic slur ... our reporters in the courtroom say it was audible. 

The judge agreed to release Hilton on $90,000 bail, but there were strings attached. The judge said Hilton, Paris' younger brother, could only be released to the custody of his father, Rick Hilton. The judge also said Hilton must agree to enter a hospital where his condition could be properly diagnosed.

The hospital the judge selected is Menninger hospital in Houston.

At the end of the hearing, the judge asked Conrad if he would comply with the order, and Hilton responded, "I am sorry to the court and the entire state for disrespecting the court. I am not obsessed with hookers and I'm sorry."

LEAVING COURT
TMZ.com

Conrad's courtroom explosion comes on the heels of a similar outburst when he was arrested early Saturday morning.

CONRAD'S RANT
TMZ.com