He was granted bail, but a Central Valley man accused of terrorism will stay behind bars for now.

A U.S. Magistrate Judge granted a $200,000 bail for 20-year-old Nicholas Michael Teausant Wednesday, but it came with conditions including being on house arrest at his grandparents' home.

However, prosecutors feared his grandparents could not properly watch over Teausant, especially after being diagnosed with bi-polar disorder since being taken into custody in March.

Prosecutors also feared what might happen if Teausant was released and stopped taking his anti-psychotic medication. 

Prosecutors asked that the release of Teausant be held while the bail decision was appealed. The judge accepted that request.

Teausant was arrested near the U.S.-Canadian border and is accused of trying to travel to the Middle East to fight with the Islamic State of Iraq and Syria, better known as al-Qaeda in Iraq.

Read more: San Joaquin County Man Accused of Attempting to Assist Al-Qaeda.