Jordan has released several government critics jailed for nearly one month after they demanded accountability and transparency on Facebook and in statements.

Jordan's spy agency, the Mukhabarat, began rounding up scores of activists in early January who called for an end to corruption, family members and lawyers told Al Jazeera.

Some of those detained were former members of the military and government, and many were high school teachers who had also spoken out.

Those detained faced charges of "trying to undermine the regime" and "insulting the king", according to their attorneys.

READ MORE: Jordan cracks down on activists over social media posts

About 20 people had been jailed. Eight were released on Tuesday night and others will be freed in the coming days, press reports said and sources told Al Jazeera.

"The military prosecutor told us we all will be released on bond, even though there were no formal charges against us or a court appearance," retired General Mohamad al-Otoom, who was released on Tuesday, told Al Jazeera.

Zaki Bani Irsheid is a leader in Jordan's Islamic Action Front, the country's largest political party and an arm of the Muslim Brotherhood. He was imprisoned for a year and a half for criticising the United Arab Emirates' decision to classify the Brotherhood and Islamist organisations as "terrorist" groups.

Irsheid had urged Prime Minister Hani Mulki to release those recently detained, but never received a response. He said the government is largely powerless when it comes to the powerful state spy agency.

"The Mukhabarat practically runs the country without a legal mandate, or any kind of check and balance that would guard against abuses of power, or even amassing too much power," Irsheid told Al Jazeera.

Hussam Abdallat, a former high-ranking official who also was released without charge, said he was detained illegally but described his dealings with the military prosecutor as "friendly".

READ MORE: Weapons for Syrian rebels sold on Jordan's black market

Family members and supporters had protested for several weeks in front of parliament and the government house demanding the release of their loved ones.

Esam al-Zaben, a retired air force lieutenant-colonel and fighter pilot, was arrested last week for after calling for a consumer boycott of products such as eggs and potatoes to protest against skyrocketing prices.

He was also freed on Tuesday. Zaben also challenged mobile phone companies after the government proposed taxing users $3 for using popular social media apps such as WhatsApp. His Facebook page soon attracted 1.3 million followers.

"My client committed no crime, all he was trying to do was protect consumers against exploitative businesses," said Taher Nassar, Zaben's lawyer.

Calls made to government spokesman Mohammad al-Momani for comment went unanswered.

Khaled al-Majali - a retired Mukhabrat officer and member of the Military Veterans Association - accused his former employer of blocking his news website, All of Jordan, after critical reporting on the detention of activists.

Defence attorney Saleh al-Armouti described the episode as "a serious breach" of Jordan's constitution, and demanded an end to the arbitrary arrests by the Mukhabrat of Jordanian citizens.

Jordan's ailing economy has suffered because of the wars in neighbouring Iraq and Syria and the influx of refugees. Syria and Iraq were Jordan's largest trading partners before the start of the conflicts in both countries.

According to the World Bank, the average income of a Jordanian citizen is about $5,000 a year.

Follow Ali Younes on Twitter: @ali_reports