Wearing a face mask, Brazilian President Jair Bolsonaro posed for photographs with children plucked out of a crowd of supporters on Sunday, disregarding public health advice aimed at containing one of the world's worst coronavirus outbreaks.

Bolsonaro's latest flouting of social-distancing guidelines came after he lost two health ministers in a month, both of whom resisted his fight against quarantines. Brazil's confirmed cases of the virus passed those of Spain and Italy on Saturday, making it the site of the world's fourth-largest outbreak.

Health Ministry figures released on Sunday evening showed that 7,938 new cases were recorded in the past 24 hours, bringing the total above 241,000, while the death toll increased by 485 to 16,118.

In an online video, Bolsonaro said he welcomed the demonstration at the presidential palace in what has become a nearly biweekly affair, with the president and supporters defying quarantines that have the support of most Brazilians.

"Above all (the people) want freedom, they want democracy, they want respect," he said, adding that Brazilians want to get the economy back up and running as quickly as possible.

An opinion poll released last Tuesday showed two-thirds of Brazilians agreed with the need for social distancing to contain the outbreak, which governors and health experts recommend, while Bolsonaro tries to open gyms, hair salons and other businesses.

On Friday, Nelson Teich resigned as health minister as he and the president showed themselves increasingly out of step, with Bolsonaro calling for a rollback of state quarantines and for the widespread use of unproven drugs, such as chloroquine, to fight the virus.

"Chlo-ro-quine! Chlo-ro-quine!" chanted Bolsonaro's supporters outside the presidential palace in Sunday, as well as "We want to work!"

Banging drums, blowing horns and letting off fireworks, the crowd created a carnival atmosphere.

Wearing a white face mask and flanked by ministers, security and friends, including a child at his side dressed head to toe in army fatigues, Bolsonaro approached his supporters, waving, smiling and giving the thumbs up.

He mingled with the crowd less than during other recent demonstrations, but he did pose for photographs with at least three young children.

Vice President Hamilton Mourao, who went into isolation on Saturday after the diagnosis of a public servant near him last week, tested negative for the coronavirus, his office said on Sunday.

Nationwide testing in Brazil still lags far behind European nations. Brazil had processed nearly 338,000 novel coronavirus tests in official labs by the beginning of last week, according to the Health Ministry. An additional 145,000 tests were under analysis or waiting in line.

By contrast, Italy and Spain have each run some 1.9 million official diagnostic tests for the virus.