Voters dealt a potentially ruinous blow Sunday to the bailout keeping Greece from bankruptcy, sweeping away its supporters and pushing top political leaders to say they would renegotiate the rescue package or overturn it completely.

The defeat left the two political parties that had supported the bailout with only 34 percent of the country’s support, according to initial results. The rescue package, Greece’s second, gave the country $171 billion in emergency loans earlier this year but required biting spending cuts. Now, both the aid and the cuts are in doubt.

The move to renegotiate the rescue package brings new uncertainty to Greece’s membership in the shared euro currency zone and reopens wounds that had scabbed over in the months since torturous negotiations concluded in February. If the country fails to implement promised measures and its international backers cut off the flow of money, the consequences could be even more painful, for Greece and for Europe as a whole.

Heightened fears about the euro zone’s financial future could drive Spain and Italy’s borrowing costs to crippling heights. Even rich countries such as Germany would be hard hit by the billions of dollars in losses they would take on loans made to Greece.

The vote was a stunning repudiation of the two political parties that have ruled Greece since the end of dictatorship here nearly 40 years ago. The pro-business New Democracy Party and the Socialists have traded power for decades. Now, a cacophony of new, skeptical voices will crowd the halls of parliament — including a far-right party called Golden Dawn, whose supporters celebrated Sunday night with flaming torches and the Nazi salute.

With 74 percent of the vote counted early Monday morning, New Democracy appeared to be in first place with 20 percent, a sharp drop from 33 percent in 2009 and its worst showing since the party was founded in 1974. The Socialists plummeted from 44 percent of the vote in 2009 to a likely third-place finish with 14 percent.

New Democracy leader Antonis Samaras said Sunday he would try to renegotiate the terms of the bailout and form a coalition of pro-European parties, not all of whom have committed to the austerity measures.

“We are ready to assume the responsibility of forming a national salvation government with two sole aims: to see Greece remain in the euro zone, and to modify the bailout policies in order to have growth and bring relief to Greek society,” Samaras told supporters Sunday night after polls closed.

The new power in the country appears to be an anti-bailout party called the Coalition of the Radical Left, which placed second with 16 percent of the vote. Party officials say the group supports Greece’s continued membership in the European Union and its use of the shared euro currency, but its leader said Sunday night that he would try to overturn the bailout.

Alexis Tsipras, 37, the leader of the party, said he wanted to “annul the memorandum of bankruptcy,” and called the bailout “barbaric.”

The vote was the first chance for the land that invented democracy to exercise it on a national scale since being struck by an economic crisis in 2009. But with 32 parties mustering candidates for parliament, and at least seven of them appearing to clear the bar to entry, no one group has a clear mandate.

If the international officials who administer the $171 billion bailout decide that Greece has failed make adequate progress on austerity measures that it promised to enact by June, they could pull the plug soon after. That would likely plunge Greece into bankruptcy and leave other European governments on the hook for the billions of dollars they have loaned the troubled country. No country has ever received such a large bailout — and been asked to cut so much in return.

Few voters in Athens were hopeful that the election would bring a quick improvement, and many said that their friends and family, once united around either the Socialists or New Democracy, were split, turning to the far-left and far-right in their search for alternatives.

“Greeks aren’t voting for a government. They’re just casting a protest vote,” said Marina Miatsa, 57, an architect who said that her business has crashed along with the country’s economy. “There cannot be a new beginning until these people who have ruled Greece go home.”New Democracy will have three days to try to form a coalition, with the second- and third-place winners taking their turn if the party is unable to do so. If New Democracy leaders fail to agree on a coalition, the president will call a new parliamentary election, leaving the country in political limbo.

“We never thought we would see this kind of uncertainty again,” said Chryssa Nikolaou, 59, a dry cleaner who remembers Greece’s tangled transition to democracy in 1974 when the military dictatorship fell, and voted at a graffiti-covered school in the middle-class Athens neighborhood of Patissia. With the austerity measures that came with the bailout, she said, “we feel like guinea pigs.”

Austerity measures have helped aggravate the pain in an already crushing economic situation. Unemployment stands at more than 21 percent and is getting worse. Taxes have risen, and pensions and pay have been cut. Further cuts are scheduledfor the coming months, and Greek politicians say that only more spending and investment will help their country out of its immediate pain. So far, it has not been forthcoming, but many cast their hopes northward to France, where Socialist Francois Hollande beat Nicolas Sarkozy in its presidential election, also held Sunday.The new government will take over from Prime Minister Lucas Papademos, an unelected economist who came to power in November with a mandate to implement the austerity measures required by Greece’s lenders and then step out of the way.“It will be very difficult to form a government that will be able to survive in parliament, said Dimitri Sotiropoulos, a political scientist at the University of Athens. “It’s too fragmented to allow for any kind of meaningful cooperation.”

What he will step aside for is not yet clear.

Special correspondent Elinda Labropoulou contributed to this report.