A Brazillian court has ordered President Jair Bolsonaro to wear a mask when out in public, ruling that he has a "constitutional obligation" to follow precautionary measures amid the coronavirus pandemic.

"The president has a constitutional obligation to follow the laws in force in the country, as well as to promote the general welfare of the people, which means taking the necessary measures to protect citizens' right to health," Judge Renato Borelli wrote, according to the AFP.

The ruling also applies to Bolsonaro's cabinet and staff. The far-right leader has flouted protective measures, dismissed the severity of the pandemic and minimized its danger.

In this May 26, 2020 file photo, Brazil's President Jair Bolsonaro, wearing a face mask with a logo of the Federal Police, leaves his official residence of Alvorada Palace in Brasilia, Brazil. (AP Photo/Eraldo Peres, FIle)

In this May 26, 2020 file photo, Brazil's President Jair Bolsonaro, wearing a face mask with a logo of the Federal Police, leaves his official residence of Alvorada Palace in Brasilia, Brazil. (AP Photo/Eraldo Peres, FIle)

As of Tuesday, Brazil reported more than 1.1. million COVID-19 cases and more than 51,200 deaths -- the second-highest of any country, according to Johns Hopkins University.

Despite the large figures, Bolsonaro has been seen in public without a mask, gathering with large crowds, shaking hands with strangers and ignoring social distancing measures. He has argued that the protocols to combat the pandemic could be more dangerous than the outbreak itself.

CLICK HERE TO GET THE FOX NEWS APP

The case against him was brought by a lawyer who said Bolsonaro should be held to account for his "irresponsible behavior."

Brazilian Education Minister Abraham Weintraub was recently fined nearly $400 for attending a pro-Bolsonaro rally in Brasilia without a mask.