That was the highest toll in an attack since Lebanon's 1975-1990 civil war.
Coming a week after a bombing in the Beirut bastion of Shiite party Hezbollah, a close ally of Bashar al-Assad, the bombings in the northern port of Tripoli risk further stoking tensions between supporters and foes of the Syrian president.
"The death toll has risen to 42," a security source told AFP.
Earlier, the Lebanese Red Cross earlier said there were also at least 500 wounded, with director Georges Kettaneh adding that many of those hurt had serious burns and head wounds.
More From This Section
The first bomb struck in the city centre at the Al-Salam mosque as worshippers were still inside.
Local television showed images from a CCTV camera of people sitting on the floor listening to a talk as cars drove past outside, when the explosion hit and the worshippers scattered in panic.
The second explosion struck outside Al-Taqwa mosque, about two kilometres (a little more than a mile) away, near the port.
As huge clouds of black smoke billowed into the air, television channels aired footage of the dead, of buildings with their fronts blown in and vehicles ablaze.
People rushed to help the wounded, as others hysterically sought their loved ones.
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.