Athens - Greek voters narrowly favored a pro-bailout party in parliamentary elections on Sunday, a result that is likely to calm world markets and ease fears that the country will leave the euro zone.
Official projections showed the conservative New Democracy party as coming in first, giving it the chance to collect enough support to form a pro-bailout coalition and keep Greece in the euro zone.
Late Sunday night, Alexis Tsipras, the leader of the leftist Syriza party, conceded the election and congratulated the conservative leader of New Democracy, Antonis Samaras. Syriza had called for a rejection of the loan deal that Greece had made with foreign creditors.
Though no party is expected to earn enough seats in the 300-member Parliament to form a government, official projections show that the two traditional parties — New Democracy and the socialist Pasok — would get enough seats to form a coalition.
Projections gave New Democracy 29.5 percent and 128 seats. Syriza, which had vowed to reject the international conditions for the Greek bailout, was second with 27.1 percent and 72 seats. Pasok trailed with 12.3 percent and 33 seats. A coalition would need at least 151 seats to form a majority government.
New Democracy and Pasok have called for renegotiating the terms of their agreement with the country's foreign creditors, known as the troika — the European Commission, the European Central Bank and the International Monetary Fund
New Democracy also placed first in the elections on May 6, but failed to form a government with its former rivals, the Socialists. This time around, the parties do not have the luxury of squabbling over their differences and must form a coalition, however short-lived, because without foreign financing, Greece is expected to run out of money to meet expenses as soon as next month.
Any new leader will face an uphill battle to inject confidence into a paralyzed Greek economy that depends heavily on the continued infusion of money from the European Central Bank. The bank has become the last lifeline for a financial system that has all but seized up and a deficit-ridden government that has little ability to raise new revenues or borrow money to continue its operations.
Late Sunday night in Brussels, euro zone finance ministers said in a statement that they would help Greece transform its economy and that continued fiscal and structural reforms were the best way for Athens to cope with its economic challenges.
"The Eurogroup reiterates its commitment to assist Greece in its adjustment effort in order to address the many challenges the economy is facing," the statement said.
It added that representatives of Greece's creditors would return to Athens to discuss emergency loans and changes as soon as there was a government in place.
In an early sign that the outcome could provide at least a temporary lift to global financial markets, the euro gained in value against the dollar on Sunday.
"It looks like we've avoided the worst-case scenario," said Darren Williams, a European economist for Alliance Bernstein in London. "I think that's important, because we could have gone to a very bad place very quickly."
While most financial markets are closed during the weekend, foreign currency trading is always open. Market watchers cautioned about drawing broad conclusions from the trading because of the light volume. But the euro's tick upward was consistent with the relief expressed by strategists and investors watching the election results.
For a fuller picture of how markets will respond to the elections, strategists will be carefully watching the Asian stock exchanges when they open, which will be Sunday night in the United States.
Previous rallies in response to developments in Europe have been short-lived. A few weeks ago, markets initially responded positively to a bailout plan for Spanish banks, but that optimism quickly gave out when the American stock markets opened on Monday.
Mr. Williams said attention will now turn to meetings of international political leaders at which the terms of Greece's bailout plan could be revised.
On Monday, leaders of the Group of 20 developed and emerging economies, meeting in Mexico, are expected to debate ways to keep the Greek crisis and the weakness of the bigger economies of Spain and Italy from undermining the euro and dragging the global economy into a new recession.
Central bankers from Tokyo to Washington have pledged to intervene in financial markets if necessary, but the Greek drama could keep investors on edge for weeks.
In Greece, Syriza had billed itself as a kind of "Greek Spring," capturing the momentum of those hungry for change at almost any cost from a political system that is widely seen as corrupt and ineffective. It also had support from voters who felt betrayed by the Socialists, whose party was in power in 2010 when Greece signed the first of its two loan deals with foreign creditors.
For its part, New Democracy has been tapping into different fears — of the unknown, of illegal immigration, of an exit from the euro zone hastened by a Syriza victory. New Democracy's main campaign advertisement showed an elementary school teacher telling his students which countries use the euro. When one asks, "And what about Greece?" the teacher stares back in stony silence. "Why, teacher, why?" the student asks.
Niki Kitsantonis contributed reporting from Athens, and Nathaniel Popper from New York.