CAIRO — Citing recent episodes of violence, the government of Bahrain on Tuesday banned all public rallies and demonstrations, a move that drew swift condemnation from human rights groups and opposition activists who said it was intended solely to stifle criticism of the ruling monarchy in the tiny Persian Gulf nation.

In a statement, Bahrain’s interior minister said protests were banned after “repeated violations” by rally organizers, including riots, attacks on property and calls for the overthrow of “leading national figures.” Legal action would be taken against anyone attempting to organize a rally, the statement said.

A government spokesman, Fahad al-Binali, said in an interview that the ban would be temporary and was intended to “calm things down” after the recent deaths of protesters and police officers.

Instead, though, the move seemed likely to inflame the already dangerous standoff involving a protest movement that has been unable to wrest freedoms from a government that opposition activists say is methodically blocking all avenues for dissent. In recent weeks, activists have been prosecuted for postings on social media, and doctors, charged with illegal gathering and other crimes after treating protesters, have been sent to jail.