Two Libyan militias have called for the country's legislators to step down or be detained, but the head of the interim parliament has refused and called the ultimatum an impending coup.
The term of the Libyan parliament, or General National Congress (GNC), expired on February 7. However, legislators voted to extend it with plans to hold new elections in the spring.
Since then, hundreds of protesters have held daily demonstrations demanding the GNC be dissolved.
Rival militias, which wield the real power in Libya, have lined up behind competing political factions in what has become a power struggle between Ali Zidan, Libyan's Western-backed prime minister, and Islamist factions in parliament that are trying to remove him.
The ultimatum came a day after Libyans marked the third anniversary of the start of their revolution that toppled longtime leader Muammar Gaddafi but left the country with no strong central government or military.
Successive governments have relied on former rebels who fought Gaddafi to fill the security vacuum, but the fighters formed armed groups that have gradually turned the country into fiefdoms independent from government authority.
Prelude to standoff
Al Jazeera's John Hendren, reporting from Tripoli on Tuesday, said that the militias' ultimatum was the prelude to a standoff. "Sides are beginning to align, with some militias still in support of the government," he said. "We could have a standoff. We have the potential for a confrontation, but this is just at the talking stage."
Tuesday's political drama unfolded when the al-Qaaqaa and al-Sawaaq militias called on the parliament "to hand over power" by 9pm local time (19:00 GMT), saying legislators who refused to do so would be considered "usurpers" and be detained.
Several militiamen appeared on TV, with one reading out the joint statement.
The commander denounced Islamists, saying they are an "epidemic disease for which we will be the cure" and pledged, "in front of God and the people, that we are not and we will not be seekers of power ... but protectors of the nation until it stands on its feet to build its military and security institutions".
The Libya International Network later broadcast live exercises of men in uniform with a timer counting down the five-hour period given in the ultimatum.
Movement of those forces was likely to provoke rival militias in the city of Misrata into action as they back the Islamist factions in parliament.
However, the ultimatum expired without major forces' deployment to the convention centre where the GNC convenes.
Militias on alert
Tripoli-based militias were on alert, with militia members gathered inside their camps waiting for commanders' orders.
The National Forces Alliance - which is among the largest blocs in parliament and backs Zidan - distanced itself from the militias in a statement on its official Facebook page, insisting it has "no armed wings" and saying efforts to defuse the situation "requires contacting the group that delivered the statement".
Many Libyans blame militias and infighting inside parliament for a lack of progress in the transition towards democracy since the revolution.
Oil production, Libya's lifeline, has slowed to a trickle as armed protesters and tribesmen have seized oil ports and fields across the vast desert nation to press political and financial demands.
Al-Qaeda-inspired fighters, meanwhile, are spreading.
The group Ansar al-Sharia, which is believed to be behind the 2012 attack on a US diplomatic post in the eastern city of Benghazi that killed the ambassador and three other Americans, is increasing its strength not only in Benghazi, but in cities further west like Sirte and Ajdabiya.
Source: Al Jazeera and agencies