Islamic militants clashed with Saudi security forces in Islam's holiest city Mecca (search) and the nearby port city of Jiddah (search) in gunbattles that killed two militants and two policemen Thursday, a day Saudis were going to the polls in the latest round of municipal elections.

It was the latest fighting in Saudi Arabia's two-year-long crackdown on Al Qaeda-linked militants opposed to the kingdom's ruling family, a campaign that authorities have said they were winning with the killings of several high-level suspects over the past month.

In the Mecca battle, militants holed up on a hill in a low-income neighborhood, firing automatic weapons and rocket-propelled grenades at police, residents of the area said. Security forces called in helicopters that fired down on the militants, they said.

The fighting started when four militants in a car — a driver and three others disguised in women's all-covering robes — tried to cross through a checkpoint into the city several hours after polls closed, said Brig. Gen. Mansour al-Turki, an Interior Ministry spokesman.

When stopped, the militants tried to flee. Police captured the driver but the three others fled, al-Turki told the state-run television station Al-Ekhbariya (search).

The three ran into the Umm Lajoud neighborhood, and after several hours of fighting, two of the militants were killed and the third wounded and captured, security officials in Mecca said, speaking on condition of anonymity. Two policemen were killed, they said.

The Interior Ministry confirmed in a statement that two militants and two policemen were killed, and added that four members of the security forces were lightly wounded.

Residents of Umm Lajoud said the shootout lasted two hours, with police calling in troops and helicopters to batter the militants on the hill where they'd taken shelter. During the battle, 15 cars, mostly civilian, and a house caught fire in a narrow alley looking on to the hill.

Footage from Associated Press Television News showed police with automatic rifles keeping back civilians and a body being carried into an ambulance. It was not clear if the body was wounded or dead.

Al-Turki told The Associated Press that the fighting had ended, but refused to give any details or confirm the casualties.

Al-Turki refused to reveal the identities of the militants or say if they were on Saudi Arabia's list of 26 most wanted militants. Only three fugitives remain at large from that list, including Saleh al-Aoofi, the current head of Al Qaeda's branch in Saudi Arabia.

Hours earlier, security forces fought a pair of militants in Jiddah, about 40 miles from Mecca, officials in the port city said. The gunmen opened fire when stopped by a patrol, then led police on a chase through the city until they holed up in a farm on Jiddah's edge, the security officials said, on condition of anonymity. After several hours of gunfire, the two militants were wounded and captured, they said.

It was unclear whether the fighting was connected with the voting for municipal councils that took place Thursday in both cities and in other parts of western and northwestern Saudi Arabia, the third and final round of the kingdom's first ever elections.

Al Qaeda's branch in the kingdom issued no direct threats or condemnations against the election, and authorites drew no connection between the fighting and the voting. Both battles appear to have been sparked spontaneously when militants were discovered. The Mecca gunbattle broke out about two hours after polls closed. The Jiddah fighting took place while polls were open.

Two earlier rounds of voting took place in central and eastern Saudi Arabia in February and March, and Islamic hardliners did well, making strong gains. It is only a limited experiment in democracy — women are barred from voting, the councils have little power and half their members are appointed by the government — but Saudis have welcomed the chance to make their voice heard in a country where the royal family has kept a strict monopoly on power.

In Jiddah on Thursday, many of the men lined up to vote were Islamic fundmentalists, distinctive for their long beards and short white robes. Voting was also going on Thursday in Qassem, the most ultraconservative region of Saudi Arabia, northwest of the capital, Riyadh.

Results of the Thursday's voting were expected on Saturday, and hardliners were expected to do well.

Saudi Arabia, the birthplace of Al Qaeda leader Usama bin Laden and 15 of the 19 Sept. 11 hijackers, has waged a crackdown against Al Qaeda and other armed militants since 2003, after a string of deadly bombings. Its security forces have killed or captured 23 of the militants on the most wanted list.

In the first week of April, security forces waged their biggest gunbattle to date with militants, fighting a band of them for three days in the northwestern desert town of Rass. Fourteen militants were killed — including two members of the most wanted list — and six others captured, and a day after the battle ended police in Riyadh killed another figure from the list.

The Mecca gunbattle took place about 5 miles from the mosque surrounding the Kaaba, Islam's holiest site, where each year millions of Muslims from around the world gather for the Hajj pilgrimage.

Mecca has not been immune to violence in the Saudi campaign against militants. In August last year, police killed a militant who threw a hand grenade at them. Clashes in June and November 2003 killed seven militants and two policemen.

After those clashes, state media carried interviewed with citizens criticizing militants for taking their fight into the holy city, and the grand mufti — one of the highest Islamic officials in the country — condemned extremists for violating Mecca's sanctity.

Al-Turki acknowledged that the successes earlier this month did not mean "full security control has been achieved."

"There are still some [militants] at large and are wanted by police and there still who are being sought by the security apparatus, but this operation confirms that the security action is going on and the security apparatus are doing their job well," he told Al-Ekhbariya.