Brazil's interim president, Michel Temer, gives a thumbs-up during his address to the nation on May 12, 2016, after the Senate voted to suspend President Dilma Rousseff pending an impeachment trial. (Eraldo Peres/AP)

Michel Temer says his top task as Brazil’s new leader will be to stabilize the country after months of political upheaval. But he will also need to quickly salvage this country’s reputation ahead of the Rio Summer Olympics and convince the world that Brazil is not a basket case.

Few countries have faced so many problems ahead of hosting the Games. A Zika-virus outbreak rages in Rio de Janeiro. Crime is surging after the failure of a plan to “pacify” the city’s slums, or favelas. Part of a bike path built for the Games collapsed into the ocean last month, killing two and triggering fears about shoddy construction work.

These troubles seemed to have barely registered with Brazilian politicians consumed by their own crises. A drawn-out, messy impeachment fight culminated in President Dilma Rousseff’s suspension this week and brought Temer to power.

In his first speech as interim president, he told Brazilians that the Olympics would be a one-time opportunity to make a good global impression.

“Billions of people will watch the Games, and journalists from different countries will be here to report on the host nation,” he said. “We know that beyond sports, they will also focus on the political and economic conditions of the country.”

Brazil's senators voted overwhelmingly on Thursday, May 12, to put President Dilma Rousseff on trial, an impeachment push driven by mounting frustration in the country. (Dom Phillips,Nick Miroff,Jason Aldag/The Washington Post)

Temer may want them to focus as little as possible on those two sore points. But the Senate impeachment trial of Rousseff can extend up to 180 days — meaning it could still be underway when the Games open on Aug. 5. Rousseff vows to fight charges of violating budget laws and insists that she did not break the law.

On his first day on the job, Temer’s new sports minister, Leonardo Picciani, issued a statement addressing charges that he has a conflict of interest because he and his family are part owners of a company that supplied gravel for the Olympic Park and a rapid-bus lane built for the Games. He said that the ministry does not contract for construction projects and that the Olympic infrastructure is already in place, so there is no conflict of interest.

Organizers say the Olympic facilities are nearly complete and will be ready on time. Still, a subway line connecting the suburb where the Games are being held to the rest of the city has not opened. Officials have backed off promises to clean up the filthy water of Guanabara Bay, where sailing races will be staged.

When a 50-yard portion of a seaside bike path was struck by a wave last month and plunged into the sea below, it also renewed fears of corner-cutting on construction projects linked to the Games. Two people died, and the path has remained closed amid reports that it was not securely attached to its supporting stanchions.

Brazil’s new Olympic facilities will open under a cloud of suspicion, with the chief executive of one major contractor recently sentenced to prison for 19 years on corruption charges. Executives of other construction firms are also in jail or under indictment.

U.S. officials estimate that as many as 200,000 Americans will visit Rio for the Games, but for many spectators, the Zika epidemic may be more worrisome than the state of the Games facilities.

A public-health expert writing in the Harvard Public Health Review argued this week that the Games should be canceled or moved, because visitors infected with the Zika virus in Brazil will return home and accelerate the spread of the virus.

“Rio is not on the fringes of the outbreak, but inside its heart,” wrote Amir Attaran, a public-health and law professor at the University of Ottawa. He cited Brazilian government data showing 26,000 suspected infections in Rio, the highest of any state in Brazil.

Although most Zika-infected patients experience mild symptoms or none, the virus can cause devastating birth defects and also can trigger Guillain-Barré syndrome, a rare and sometimes fatal nerve disorder.

“While Brazil’s Zika inevitably will spread globally — given enough time, viruses always do — it helps nobody to speed that up,” Attaran wrote.

The International Olympic Committee insists that the Games will go forward as planned, and the World Health Organization issued a statement Thursday encouraging travelers to use insect repellent, wear light-colored clothing and take other precautions to avoid being bitten by Zika-infected mosquitoes.

With the Brazilian economy in its worst depression since the 1930s and millions out of work, the country that will welcome the world to Rio is a battered and less confident version of the one picked as host in 2009, when its economy was purring. Stretched finances have forced security spending cuts in the state of Rio de Janeiro, where violent crime is increasing.

Brazil is the first nation in South America to host the Games, and the cost-benefit record for the role of host has been a mixed one in the modern era. The 1992 Olympics in Barcelona were a huge success for the city, turning it into a major tourist destination. For Greece, which hosted the 2004 Games in Athens, the event was a loser.

“Normally, it is the moment a country shows its best,” said Lourdes Casanova, an economist at Cornell University who is originally from Barcelona. She predicted that Brazil would succeed, as it did with the soccer World Cup in 2014.

“I am sure this will be an excellent Games,” she said.

Chris Gaffney, an expert on Brazil’s preparations for the Games, disagreed.

“The symbolic capital of winning the Olympics for Brazil has been spent or lost,” said Gaffney, a geographer at the University of Zurich, in Switzerland. “This is supposed to mark the emergence of a regional powerhouse with pretensions for a seat on the U.N. Security Council. I don’t think anyone takes those claims as seriously as they did seven years ago.”