AMMAN, Jordan, July 31 — After months of growing tension with the Jordanian government, the opposition Islamic Action Front abruptly withdrew from nationwide municipal council elections on Tuesday. The group cited voting irregularities in the elections, which were seen as a test for the more politically sensitive parliamentary elections this fall.

The Islamic Action Front, the political arm of the Muslim Brotherhood in Jordan and the most influential political opposition group in the country, announced at midday that it was pulling out of the elections. The group said that because of violence and accusations of irregularities, its participation would lend legitimacy to the government’s efforts to weaken it.

“The level of corruption we witnessed made it impossible for us to continue with this election,” said Zaki Bani Rsheid, the group’s secretary general. Mr. Rsheid said that although the group had withdrawn, it was not boycotting the political process altogether.

The group charged that soldiers had been bused into contested districts to vote and that they were allowed to cast multiple ballots. It also said government security personnel had intimidated some voters and kept them from reaching the polls.

Marouf al-Bakhit, Jordan’s prime minister, said the Islamic Action Front’s withdrawal was illegal because it violated rules defining the time frame for quitting an election.

Mr. Bakhit would not comment on specific allegations of fraud, but said the elections were “legitimate under the Constitution and will not be marred by the nonparticipation of a certain party.”

Sporadic violence at or near polling stations, including gunfire and street brawls, further marred the sense of change the government had sought to engender.

Jordan has long tried to engage and co-opt its Islamic opposition, which is one of the few officially sanctioned Islamist political parties in the Middle East. However, with the rise of Hamas in the Palestinian territories and growing fears of an Islamist ascendancy throughout the region, the government has worked to weaken the group and to ensure it does not make any major political gains, analysts say.

“What is clear is, we will not be drinking from the same goblet as the Palestinians did,” said Fahd Kheitan, a political columnist for the Jordanian daily Al-Arab al-Yawm, referring to the election of Hamas to lead the Palestinian government in 2006. “The government is willing to go as far as it needs to curtail the march of the Islamists.”

The uproar appeared to stymie efforts by the government to show off its effort at reform and increased representation.

“The I.A.F. is aware of how sensitive this matter is to the government and how it will affect it negatively,” said Mohammad Momani, a political science professor at Yarmouk University. “They are using this as a bargaining chip to deal with the government, to press the government — and the government in no time will attempt to re-engage them.”

The elections were the first time Jordanians outside Amman could elect local mayors, who were previously appointed by the king. It was also the first time Jordanians could elect their entire municipal council instead of having half the membership appointed by the king. The government had also dropped the voting age to 18 from 19 to include more of the country’s young people.

But in the often circuitous manner that political reform takes in much of the Middle East, the changes excluded Amman, Jordan’s capital and largest city, and where the I.A.F. has its greatest following.

Some analysts saw the group’s withdrawal as well-planned political theater intended to embarrass the government in an election Mr. Rsheid conceded was secondary to the more significant parliamentary elections in the fall.

City councils in Jordan are largely administrative bodies with limited political and spending power. The Islamic Action Front had fielded only 90 candidates, 4 of them women, among more than 2,000 vying for more than 1,000 seats across the kingdom.

But in a country where tribal loyalties typically trump Islamic credentials in local elections, the Islamists did not seem very likely to make a tremendous showing.

Still, the tug of war between the government and the Islamic Action Front was seen largely as a prelude to the November vote, in which the group is favored to gain seats.

“This is the first confrontation between the two sides on the streets before the parliamentary elections,” said Mr. Kheitan, the columnist, who said the government had made its position plain. “After today, the statement is clear: the Islamists will not be allowed to spread.”

Suha Maayeh contributed reporting.