The two former MPs from Bahrain's largest Shiite formation, the Islamic National Accord Association (Al-Wefaq), Matar Matar and Jawad Fayrouz, were arrested at gunpoint in early May.
The men were being tried by a national safety court for having allegedly called for regime change and spreading rumours linked to the pro-democracy protests.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
After tanks rolled into the Gulf country in mid-March Bahraini authorities said 24 people had been killed during the unrest, most of them demonstrators
The public prosecutor has decided to "release several detainees ... until the (civilian) court looks into their cases," including "two former MPs and a lawyer," state news agency BNA reported.
Bahrain had declared a State of National Safety, a lower degree of emergency, on March 16, a day before security forces crushed month-long street protests demanding democratic reforms.
On June 1, King Hamad announced a lifting of the state of emergency and all cases were referred to civilian courts.
At least 500 people have been detained in Bahrain since the protests broke out in the Sunni-ruled Gulf kingdom which has a Shiite majority, according to Amnesty International.
Almost 2,000 people have been dismissed or suspended from their jobs, it said.
Security forces in the archipelago cracked down on the mostly Shiite protesters in mid-March after being backed by troops with tanks who rolled in from neighbouring Sunni Gulf monarchies.

