(Andreas Solaro ~ Associated Press)
The move ends a protracted political crisis that had cast grave doubt over Greece's future in Europe's joint currency and threatened to plunge the continent deeper into a financial crisis with global repercussions.
But the new government still has massive challenges ahead: It must deliver on pledges by its predecessors to generate huge new savings, privatize publicly-owned companies and real estate, cut about 150,000 civil service jobs in coming years and open restricted professions to competition.
Samaras, a U.S.-educated 61-year-old economist, was sworn in three days after his New Democracy party won the second national elections in six weeks but without enough votes to form a government on its own. He is Greece's fourth prime minister in eight months.
German Chancellor Angela Merkel congratulated Samaras by phone and wished him "luck and success in the difficult work that lies ahead of him," the German government said. It added that Merkel hopes for "good cooperation" with Samaras and his government, and she invited him to visit Berlin.
Germany is the main contributor to Greece's two multibillion-euro rescue loan packages.
The conservatives will join forces with the socialist PASOK party, which is led by former finance minister Evangelos Venizelos and came in third place, and the smaller Democratic Left led by Fotis Kouvelis. Discussions on the lineup of ministers were expected to be completed by Wednesday night.
"I will ask the new government that will be formed tomorrow to work hard so that we can offer tangible hope to our people," Samaras told reporters as he left the presidential mansion.
Greek stocks rose marginally in response to the news, with Athens shares closing up 0.5 percent, limiting earlier gains.
Analyst Theodore Krintas said he expected markets to welcome the breakthrough.
"The formation of a government ... will take part of the uncertainty away and at the same time hopefully will take Greece out of the (headlines) of the mass media all over the world," said Krintas, who is managing director of Attica Wealth Management.
Samaras, Venizelos and Kouvelis met Wednesday evening with Giorgos Zanias, who served as finance minister in the monthlong caretaker government between the May 6 and June 17 elections and was a key negotiator for Greece's bailout. The meeting was also attended by National Bank of Greece chairman Vasilis Rapanos, who is tipped to succeed Zanias as finance minister.
Discussion centered on a meeting of the 17-nation eurozone's finance ministers Thursday in Luxembourg, at which Zanias will represent Greece.
All three parties broadly back Greece's pledges to bailout creditors for further austerity and reforms, but have pledged to renegotiate some of the terms for the rescue loans. Samaras campaigned on promises to lower taxes, restart the economy and provide income boosts to low earners, large families, police and fighter pilots.
New Democracy and PASOK are also looking for an extension of at least two years in the deadlines for implementing fresh cutbacks worth a total (euro) 14.5 billion ($18.42 billion).
Kouvelis of the Democratic Left went a bit further Wednesday, saying that Greece should eventually "disengage" from the austerity commitments and "lift those measures that have literally bled society."
The eurogroup talks that Zanias will attend Thursday "will be the first big battle on the revision of the bailout agreement, the creation of a framework that will allow us to move to positive growth and to combat unemployment, which is the big problem of Greek society," Venizelos said earlier Wednesday.
Greece has been dependent on the loans from other Eurozone countries and the International Monetary Fund since May 2010. In return, it has imposed deep spending cuts, slashed salaries and pensions, and repeatedly hiked taxes.
The measures have left the country struggling through a fifth year of recession, with unemployment spiraling to above 22 percent and tens of thousands of businesses shutting down.
Earlier Wednesday, hundreds of poverty-stricken Greeks queued in a central Athens park for free vegetables. Cretan farmers handed out some 2,700 10-kilo packages of produce, in cooperation with the capital's municipal authorities.
Among the people lining up was Panayiota Sidera, 31, from Athens. She said she has been unemployed for two-and-a-half years and her husband is also out of a job. The couple is living on a (euro) 250 monthly disability pension and rent from an apartment they own, and has a (euro) 540-a-month loan installment to pay.
"That's my predicament," she said, adding that the food handout "is helping people, and I'm grateful."
"The government should have been doing this years ago," she said.
In Sunday's vote -- and the previous, inconclusive May 6 election -- angry voters strongly favored parties promising to end the hardship by tearing up Greece's pledges for continued austerity and reforms.
However, the anti-austerity standard-bearer -- the radical left Syriza party -- finished a narrow second in Sunday's election that gave New Democracy 129 of Parliament's 300 seats.
A Syriza spokesman said the new government was based on the two parties -- New Democracy and PASOK -- responsible for Greece's austerity program, as they worked together in a previous coalition that secured the country's second bailout and a massive debt writedown earlier this year.
"I am not convinced that the government is able and prepared to fight for an effective renegotiation of the loan agreement," Panos Skourletis said.
Menelaos Hadjicostis and Dalton Bennett in Athens contributed.