DAMASCUS - Syrians voted as fighting raged Tuesday in a presidential election in which Bashar al-Assad is looking to tighten his grip as his forces battle rebels in a devastating three-year war.

Assad is facing two little-known challengers and is expected to win, despite a massive rebellion and a war which the UN has warned is likely to drag on even longer as a result of the vote. In Damascus, the atmosphere was surreal, with people voting as the sound of shelling and explosions punctuated pro-Assad songs heard playing in the streets. Activists in flashpoint areas said the violence raged, with rebels raining mortars on parts of the capital firmly under government control and the air force striking opposition areas.

Assad and his British-born wife Asma cast their ballots in central Damascus, the president wearing a dark blue suit, the first lady a white blouse, a black business skirt and stiletto heels. Billboards glorifying Assad cover the streets of Damascus although inside polling stations photographs of his two challengers - Hassan al-Nuri and Maher al-Hajjar - had been put up alongside the president's.

There was no voting in the roughly 60 percent of the country outside government control, including large areas of second city Aleppo.

Polling was held in the heart of third city Homs, in ruins after rebel forces pulled out last month following a destructive two-year siege. At least 162,000 people have been killed in Syria since an uprising against Assad's rule erupted in March 2011, and nearly half the population have fled their homes. None of the voters questioned by AFP said they had voted for Assad's opponents. Nadia Hazim said she would "vote for the president - of course". Hind al-Homsi, 46, said she had sliced her finger and left a bloody fingerprint on the circle underneath Assad's name. "I want to vote in blood for the president. He is the best," she said. In the central city of Homs, security forces deployed in strength a day after a truck bomb killed 10 people in the nearby countryside.

The government said more than 15 million Syrians were eligible to take part in the election, on top of the 200,000 who voted abroad last week.

Assad allies Iran, North Korea and Russia sent observers to monitor the election, but the opposition and NATO have both dubbed it a "farce".

The vote "does not fullfil international standards for free, fair and transparent elections and I am sure no (NATO) ally will recognise the outcome of these so-called elections," said the head of the military alliance, Anders Fogh Rasmussen. The Syrian Observatory for Human Rights meanwhile said security forces across the country "forced people to close their shops and to hang pictures of Assad on the shop windows."

Observatory director Rami Abdel Rahman added: "Fear of the regime, and specifically the threat of detention for non-voters, is pushing people to vote."

Despite the vote, there was not let-up in army attacks on rebel areas, with air raids pounding the towns of Daraya southwest of Damascus and Douma to its northeast, and fighting flaring east of the capital, activists said.

The United Nations has warned the election will only complicate efforts to relaunch peace talks after two rounds of abortive negotiations in Switzerland this year.

The exiled opposition has made Assad's departure from power a precondition for any settlement and his re-election for a new seven-year term is likely to scupper any hope of getting them back to the negotiating table any time soon.

"Dictators are not elected, they hold power by force and fear - the only motivations that Syrians have to show up for this charade," opposition chief Ahmed Jarba wrote in the Washington Post.

Casting his ballot in Damascus, Foreign Minister Walid Muallem said however that "a political solution to the Syrian crisis begins today".

Waddah Abed Rabbo, chief editor of pro-Assad newspaper Al-Watan, has also argued the vote could facilitate a resumption of talks.

"In Geneva, the opposition made its rejection of Assad running in the presidential election a priority. Assad was a red line that blocked everything," he said. "Now that he will be voted back in by a majority, there will be no objection by the authorities to discuss other issues."

Noah Bonsey of the International Crisis Group said the election was part of a broader government effort to portray Assad's eventual victory as inevitable but that it was likely only to prolong an increasingly bloody war.

"The regime can only gain ground after reducing it to rubble, and can only hold it in so far as it remains empty of its original inhabitants," said Bonsey. "This was the regime's approach before the election and it remains so after it. It leads to continued war, not victory."