Most analysts expect a deal to be reached because the cost of a bailout is lower than the cost of renewed turmoil and instability that bankruptcy might bring to other nations that use the euro.

“Our common goal must remain the solution to the Cyprus problem and the pursuit of growth to the benefit of our people,” Mr. Malas said in a concession speech on Sunday night.

The “Cyprus problem” refers to the Turkish occupation of northern Cyprus, with a United Nations-patrolled buffer zone separating it from the rest of the island.

Mr. Anastasiades was one of the most prominent politicians to come out in favor of a plan to reunify the island proposed by Kofi Annan when he was secretary general of the United Nations. The Turkish Cypriots who live in the northern part of the island, which is known as the Turkish Republic of Northern Cyprus, voted in favor of the plan in a referendum in 2004. But the Greek part of the island, the Republic of Cyprus, rejected it.

The political future of the divided island — long the central preoccupation here — was not the main issue in this year’s election, which was defined by economic issues. The departing president, Demetris Christofias, a Communist who has called himself the “red sheep of Europe,” has been criticized here for agreeing to the bailout of Greece without demanding special assistance for the Cyprus banks.

That legacy made it all the more difficult for Mr. Malas to chip away at Mr. Anastasiades, who held a substantial lead in opinion polls.

Mr. Anastasiades’s victory was announced at a crowded indoor arena packed with supporters on Sunday night. His supporters honked car horns and waved Greek and Cypriot flags in downtown Nicosia, the capital, in a celebration more reminiscent of a sports championship than an election victory.

The head-to-head matchup followed a preliminary round of voting last Sunday in which Mr. Anastasiades also enjoyed a strong lead but did not win the necessary 50 percent of the vote to prevent a runoff.