UFC's Irwin Rivera freed from custody after judge approves plea of not guilty by reason of insanity on attempted murder charges

UFC fighter Irwin Rivera has been granted a conditional release from custody after a judge approved his plea of not guilty by reason of insanity to two counts of attempted murder.

Rivera was arrested in January on the two felony charges, accused of stabbing his two sisters. A judge approved the adjudication agreement between the state and Rivera's defense team at a hearing Monday in Palm Beach County, Florida, according to the sentencing order obtained by ESPN. Rivera was released Tuesday.

Doctors testified that Rivera has been diagnosed with bipolar disorder with psychosis and that the attack on his sisters was his first episode, per the document. Dr. Sheila Rapa, a witness for the prosecution, testified that with treatment Rivera was "high functioning" and that if Rivera continues to take his medication, he can maintain his stability.

"Mr. Rivera was suffering from an acute episode of psychosis, particularly Bipolar I Disorder, and Mr. Rivera was unaware of his symptoms which were not being controlled by prescribed psychotropic medication," Rapa said. "He lacked the ability of insight to tell reality from fantasy or right from wrong."

Rivera will not be committed to a hospital. Rapa said she does not believe Rivera is a threat to himself or the community and that she has no evidence of his breaking with reality. He is stabilized, she said. Rapa also said she saw "no problem" with Rivera continuing his MMA career.

Rivera, 32, does have to meet conditions to remain out of custody or a hospital, according to the sentencing order. He must remain on medication and under the care of a psychiatrist. A key, Rapa said, is that Rivera has a "hugely supportive family," which is already working with the South County Mental Health Center in Delray Beach, Florida.

Per the document, Rivera will live with his parents and brother, who will monitor his condition. For travel outside the area, Rivera must be accompanied by an immediate family member or close friends, which includes MMA teammates Gilbert Burns and Sean Soriano. Rivera's family, Burns, Soriano and another guardian, Chris Sabella, "shall immediately report any non-compliance" to the court or state's attorney, the document states.

Rivera was arrested on Jan. 7 and told police "I killed my sisters" the night before, according to the Boynton Beach Police Department incident report. Rivera told police that he entered his sisters' bedroom while they were sleeping and stabbed them with a "brass knuckle knife." Rivera said he believed he had killed his sisters and that he did it because it was his purpose, told to him by a "higher power," according to the incident report.

Rivera's two sisters -- one 33 years old and the other 22 -- were found by the police with multiple stab wounds. The younger woman had wounds in her back, head and arm, while the older had wounds on her back, face, arms and hands, plus two collapsed lungs.

Both survived with no long-term damage and testified on Rivera's behalf during the case.