Federal prosecutors who once sought to forcefully medicate a man who had aggravated the FBI with claims he was negotiating with Islamic State militants to free Western hostages have now agreed he is competent to stand trial.

Prosecutors agreed at a hearing Thursday with a defense expert's conclusion that 42-year-old Toby Juan Lopez is competent, contradicting prior evaluations by two government psychologists.

A judge ordered his release to home detention in the custody of his mother. He spent more than a year in prison without being indicted.

The former car salesman is charged with threatening an FBI agent after being told to stop trying to contact families of hostages and people he believed to be Islamic State militants.