A man convicted of stalking actress Uma Thurman and harassing her family for two years was ordered released from jail Monday and will be required to submit to psychiatric care as a condition of his probation.

Jack Jordan, 37, was accused of sending harassing e-mails to Thurman’s father and brother, loitering for hours on the steps of Thurman’s Manhattan apartment and visiting her trailer on the set of the 2006 film My Super Ex-Girlfriend.

Jordan, who had been previously committed to a mental institution, was convicted of stalking and one count of aggravated harassment, but cleared of two other counts. He could have been sentenced to up to a year in prison.

“It’s important that you understand that your conduct is unacceptable, is criminal,” said New York Criminal Court Judge Gregory Carro, who rejected a prosecution recommendation that Jordan return to jail, where he was held for four months.

Thurman testified at the trial that she was “completely freaked out” by Jordan’s actions and feared for her life and the safety of her two children.

Jordan’s lawyer, George Vomvolakis, said his client loved Thurman and was obsessed by her but that his behavior was “creepy,” not criminal.

Jordan, who appeared in court wearing rumpled clothes, said he would have left Thurman alone had he realized he was causing her pain or fear.