Hospitals nearing capacity. Deaths soaring. A president urging people back to work. São Paulo, the largest city in the Western Hemisphere, is emerging as the coronavirus pandemic’s latest global hot spot.

Confirmed cases in the city have soared 34 percent and at least 510 people have died in the past week as the public health infrastructure buckles and Brazilian President Jair Bolsonaro continues to shrug off the crisis.

“This is the picture of Bolsonaro’s Brazil,” said Gerson Salvador, an infectious-disease specialist in the intensive care unit at São Paulo’s University Hospital. “People are being exterminated. There is no organized system to care for them. They are being advised to go out and given no alternative but to work.”

Across Brazil, more than 1,000 people died of the coronavirus on Tuesday alone. The country now ranks third worldwide with 255,000 confirmed cases, trailing only the United States and Russia. In São Paulo, a city of 12 million in a metropolitan area of 22 million, suspected deaths from covid-19 have surged more than fivefold in the past month.

On Tuesday, President Trump, who has maintained friendly ties with Bolsonaro, a fellow populist, said he was considering banning travel from the country.

“Brazil is having some trouble, no question about it,” Trump told reporters at the White House. “I don’t want people coming in here and infecting our people.”

As Brazil’s death count has climbed over the past two months, the federal government’s response has unraveled. From the beginning, Bolsonaro has dismissed the virus as nothing but a “little flu” and encouraged people to get back to work. He has gone through two health ministers, both of whom refused to promote the use of hydroxychloroquine as a treatment for the virus.

Asked about the rapidly rising cases last month, the president responded: “So what? I’m sorry, what do you want me to do?”

As patients flood hospitals, state governors are scrambling to issue stay-at-home orders. In São Paulo, 90 percent of ICU beds are occupied. Family members of patients wait outside hospitals for news of their loved ones, their masks wet with tears.

In Brazil’s hospitals, doctors say they are fighting a battle on two fronts — against the outbreak and against the misinformation circulating around it.

Last month, Salvador said, he directed a patient struggling in his ICU. Breathe, Salvador told the man. He told him he had a coronavirus infection that was affecting his lungs. He told him they were going to have to intubate him and connect him to a machine to help him breathe.

“No, doctor,” the patient wheezed, according to Salvador. He would rather try hydroxychloroquine.

Bolsonaro has been promoting the antimalarial drug, contradicting public health experts and the Pan American Health Organization, which has questioned its efficacy and warned of potentially harmful side effects.

The government has distributed nearly 3 million hydroxychloroquine pills produced by the army since the start of the crisis. On Wednesday, after Trump claimed this week to be taking daily doses, Bolsonaro’s administration planned to issue a protocol recommending doctors prescribe it at the first sign of the coronavirus.

São Paulo in March became the first city in Brazil to call a state of emergency and issue stay-at-home orders. But adherence to the guidelines is fading, especially during the week, when workers weigh the risk of contracting the virus against another day without a paycheck.

“Through social isolation, we have saved the lives of 30,000 people,” said Edson Aparecido, São Paulo’s secretary of public health. The city hired 1,200 doctors and created two pop-up hospitals and four permanent hospitals in 40 days. “If not for the work that has been done until now, we would be facing a tragedy,” Aparecido said.

The city plans to create 700 additional ICU beds and expand agreements with private hospitals to take in patients.

The faces of the dead are changing. What first struck Brazil’s affluent, older, white upper class — travelers who brought the virus home from European vacations — is now taking the lives of poor, young and largely black slum residents. They include maids infected while cleaning the homes of the wealthy, construction workers and informal laborers who have had no choice but to venture out to earn money for food.

Cases exploded in Brazilian shantytowns, where families are packed into small houses with unreliable access to running water. With little help from the government, some residents have started taking matters into their own hands.

Gilson Rodrigues is a community leader in Paraisópolis, a slum of 100,000 people on the outskirts of São Paulo. After the community’s pleas for help went ignored, Rodrigues started a fundraising campaign to hire three ambulances exclusively for his community.

He also created emergency bases with EMTs, designated local schools as temporary shelters for infected residents to self-isolate and started training local teenagers to be first responders. The community organized emergency food supplies and financial relief for residents who lost their jobs.

“We know we can’t count on the mayor, the governor or the president, so we created our own alternatives,” Rodrigues said. “We know we are alone.”