NEW YORK (AP) — A New Jersey man was sentenced Wednesday to six months and a week behind bars for ramming his car into the Chabad Lubavitch world headquarters, the Jewish institution in New York where his lawyer said he was trying to win acceptance as he struggled with psychological issues.

Dan Sohail, 36, was sentenced in Brooklyn federal court by a judge who declined a recommendation by prosecutors that he force Sohail to remain behind bars for another eight months. The sentence clears the way for the New Jersey man, who has already spent six months in detention, to be released in about a week.