The Broad Front is a coalition of center-left and leftist parties that has held the presidency since 2005. Mr. Martínez was the front-runner in the first round of voting on Oct. 27, winning 39 percent of the vote.

But Mr. Lacalle Pou gained momentum after that with backing from the main candidates who did not qualify for the runoff. Polls show that voters have lost faith in the governing coalition amid a rise in crime and a slowdown in economic growth.

Still, Broad Front governments have largely avoided the corruption scandals and economic slumps that have bedeviled other leftists in the region.

On their watch, Uruguay’s economy has grown steadily, inequality has shrunk and the nation of 3.4 million people has made international headlines by championing some liberal social initiatives that were largely popular at home.

Uruguay’s Congress legalized abortion in 2012, and the following year it passed a law allowing same-sex marriage. In 2017, Uruguay became the first country to fully legalize the sale of marijuana for recreational use, creating a model for taxing and regulating the sale of drugs that drew wide international interest.

But the Broad Front struggled to persuade voters that continuity was the right course, said Gerardo Caetano , a professor of history and political science at the University of the Republic in Montevideo.

“Uruguay is part of this pattern of angry, unhappy societies that have seen an increase in purchasing power, and due to that increase they began demanding more,” he said. “People are angry and have turned against the government.”