Girija Prasad Koirala, prime minister for most of the 10 years since Nepal has had a democratic government, handed his resignation to the constitutional monarch, King Gyanendra.
"I have decided to resign as the prime minister, giving priority to solving the many challenges being faced by the nation," Koirala said over the state-run radio and television.
The move came after Koirala last weekend called out the army for the first time to battle Maoist rebels, launching an operation to rescue hostages that reportedly failed.
Opposition calls for Koirala's ouster had been growing over the past year over alleged bribery in the leasing of a jetliner for the state-run Royal Nepal Airlines from Austria's Lauda Air.
Pressure on the prime minister has intensified since the June 1 palace massacre in which King Birendra, the queen and eight other members of the royal family were killed. Witnesses and an official inquiry said Birendra's son, Crown Prince Dipendra, opened fire on his family during a dinner, then fatally shot himself.
But many Nepalese, shocked by the loss of a king revered as divine, have refused to believe that account. Discontent and blame for security lapses has fallen on Koirala. Anger at the government was worsened by conflicting information from officials after the massacre that fueled conspiracy theories.
Since the massacre, Maoist rebels have stepped up their attacks.
Last week, rebels attacked a police station and took 70 policemen hostage in a western mountain village. Koirala ordered the army to take action against the rebels and troops surrounded the village. But according to media reports, the rebels still escaped with their captives.
"The government's poor planning has made the army's position weak in its first operation against the rebels. Instead this has boosted the morale of the rebel fighters," said Khadga Prasad Oli of the United Marxist-Leninist Communist Party of Nepal.
Interior Minister Ram Chandra Poudel, who was also deputy prime minister, resigned July 13 because of differences with Koirala over handling of the insurgency.
Until now only police forces had been used against the rebels. More than 1,600 rebels, security personnel and civilians have been killed in the insurgency launched in 1996.
The prime minister faced down a rebellion in his own Nepali Congress Party a few months ago.
The party controls 113 seats in the 205-seat House of Representatives, the lower house. But it lacks a majority in the upper house, having lost a June 28 election.
© MMI The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed