The Maoists have threatened more protests
A group of Nepalese political parties has agreed to form a "national government" a day after Maoist Prime Minister Pushpa Kamal Dahal resigned.
After a meeting in Kathmandu, members of the Communist UML party agreed to head the government.
The parties have been given five days by Nepal's President Ram Baran Yadav to form the government.
Mr Dahal, best known as Prachanda, resigned after the president opposed his decision to sack the army chief.
The Maoists boycotted the all-party meeting.
They said unless the president apologised, they would not let parliament function.
Correspondents say Prachanda's resignation has pushed Nepal into a fresh political crisis following an election win by the Maoists last year.
"We want the Maoists to join the government too. But if they don't join, we can still form a majority government," senior Nepali Congress party leader Ram Sharan Mahat told the BBC.
UML leader Jhala Nath Khanal said that the Maoists "gave us the offer to lead the government and we have agreed".
Security around the presidential palace in Kathmandu was stepped up as Maoist activists held a number of street protests across Nepal.
Hundreds of policemen were deployed around the president's palace and police have detained 40 protesters.
"We have been holding protests in different parts of the Kathmandu valley on Tuesday afternoon," the AFP news agency quoted Uma Subedi, secretary of the Maoists' youth wing, the Young Communist League, as saying.
"We will launch regular protests until the president takes back his decision," she said.
On Monday, Prachanda said in his TV address that he was stepping down "for the protection of democracy and peace" in Nepal.
"The move by the president is an attack on this infant democracy and the peace process," he said.
His resignation followed months of worsening tensions between the ex-rebels and the military.
Correspondents say that the expectation now is that the Maoists will sit in opposition in parliament. There is no suggestion that they will abandon constitutional politics.
The Maoists want their fighters, who are currently restricted to United Nations-supervised camps, to be integrated into the regular Nepali army.
But the army has refused to take on the fighters, who number about 19,000 hardened guerrillas, arguing that they are politically indoctrinated.
Correspondents say that the crisis is the most serious in Nepal since its 10-year long civil war between the army and the Maoists came to an end in 2006.