Ahead of the elections, K.P. Sharma Oli and Pushpa Kamal Dahal, two former prime ministers who belong to communist parties, have formed a coalition. Shifting allegiances are common in Nepal, but the coalition surprised some here because Mr. Dahal had aligned himself with the current prime minister, Sher Bahadur Deuba, during this year’s local elections.

In an interview, Mr. Pun, the Maoist leader, said the attacks his party organized this month were in protest against leaders like Mr. Dahal, who led the Maoist insurgency. Mr. Pun said Mr. Dahal, whose nom de guerre is Prachanda, or “the fierce one” in Nepali, has backed away from more revolutionary ideas in order to appeal to voters.

“Right now, our strategy is to target political leaders,” Mr. Pun said, adding that the thousands of members of his party, the Nepal Communist Party, want to replace the country’s parliamentary government with a socialist one committed to “peace, prosperity, equity and sovereignty.”

So far, the attacks have been confined to districts that border Kathmandu, home to a few million people. Mr. Deuba said he has taken extra security steps, and Nepal’s home ministry is deploying 300,000 security officers near voting sites.

From his hospital bed, Bhes Kumar Tamang, 30, said he was traveling outside Kathmandu to an event organized by the Nepali Congress party when his vehicle was blown up. He said his injuries would prevent him from traveling to a polling site on Sunday, but he hoped that other Nepalis would vote.

“We need to make this election a success,” he said. “This is the need of our time.”

Sarita Rai, 28, who was on her way to a political rally in southern Nepal when she and her 7-year-old son, Jaibek, stepped on a land mine, wondered how she would go on.

Sobbing, Ms. Rai described being blown into the air with her son, who suffered fractures to his hand, arm, forearm and leg, and underwent surgery to remove stones embedded in his skin. Ms. Rai lost her left leg in the explosion.

“I do not know how I am going to survive this,” she said.