Updated

Lebanon is to observe a day of national mourning Saturday for 42 people killed in powerful bombings outside two Sunni mosques in a city riven by strife over Syria's war.

The attack on Friday in the northern city of Tripoli -- the deadliest in the country since its 1975-1990 civil war -- drew strong condemnation from the international community.

Coming a week after a bombing in the Beirut bastion of Shiite movement Hezbollah, a close ally of Bashar al-Assad, the bombings risk further stoking tensions between supporters and foes of the Syrian president.

The blasts hit during weekly Muslim prayers, in a city where Sunni supporters of Syria's rebels engage in frequent, often deadly, clashes with Alawites, who back the regime of Syrian President Bashar al-Assad.

The first bomb struck in the city centre at the Al-Salam mosque as worshippers were still inside.

CCTV footage aired on television showed people sitting on the floor when the explosion hit, and they scattered in panic.

The second explosion struck just minutes later outside Al-Taqwa mosque, about two kilometres (a little more than a mile) away, near the port.

A security source put the toll at 42 dead, while the Lebanese Red Cross said at least 500 people were wounded, many of them with serious burns and head injuries.

An AFP reporter saw a number of charred bodies near Al-Taqwa and the bodies of five children brought out of it.

As huge clouds of black smoke billowed into the air, television broadcast footage of the dead, of buildings with their fronts blown in and vehicles ablaze.

Hundreds of furious people gathered outside the Al-Taqwa mosque shouting curses at Hezbollah and the Syrian regime.

The powerful Shiite movement, whose militia have been fighting for months alongside Assad's troops, linked the Tripoli attacks to the one in Beirut on August 15, which killed 22 people and injured more than 300.

It said they were part of a plan to "plunge Lebanon into chaos and destruction".

Former premier Saad Hariri, a Sunni and opponent of Hezbollah, said the "authors of dissension do not want Lebanon to live in peace for one minute; they want the killing machine to mow down the lives of innocents across Lebanon".

Hariri's father and former billionaire prime minister, Rafiq Hariri, was assassinated in a 2005 car bombing in Beirut that also killed another 22 people which was, until Friday, the worst attack since the civil war.

Lebanese Prime Minister Najib Mikati declared Saturday a day of national mourning.

Syrian Information Minister Omran al-Zohbi condemned this "cowardly terrorist attack on our brothers in Tripoli," in a statement echoed by Iran.

The United States also condemned the attacks and lamented the "loss of innocent life".

In London, Foreign Office Minister Alistair Burt condemned what he called the "abhorrent attacks" while French President Francois Hollande spoke of what he called "odious, cowardly attacks."

UN Secretary General Ban Ki-moon called on Lebanese to "exercise restraint, to remain united," while expressing hope "those responsible for such cowardly acts of violence will be brought to justice as soon as possible".

On Wednesday, army chief General Jean Kahwaji had said his forces were fighting a "total war" against terrorism whose aim is "to provoke sectarian strife" in Lebanon.

A Lebanese and two Palestinians suspected of preparing a car bomb attack were arrested days after the latest blast in Beirut, the General Security agency said.

Tripoli has seen frequent Syria-related violence during the past two years, including waves of deadly clashes.

Lebanon is officially neutral in Syria's conflict, but the country is deeply divided.

Hilal Khashan, chairman of the political science department at the American University of Beirut, said: "It is clear that there is a desire to trigger a confessional war in Lebanon to divert attention from what is happening in Syria."

Friday's car bombings were reminiscent of attacks that shook the country during its civil war, but Khashan said he did not think a confessional war would break out "because it will not benefit anyone".