Police in riot gear fired tear gas canisters at protesters who marched through the streets of Puerto Rico’s capital city Monday night, demanding that the island’s governor step down.

Videos from San Juan show police firing the tear gas at the protesters, who dispersed and ran off in all directions.

The crowd of demonstrators, many waving Puerto Rican flags, largely dissipated after police formed a line and fired the canisters at them, according to Fox News reporter Jeff Paul.

The scuffle between the police and the demonstrators came after massive crowds flooded the city streets during the day, calling for Gov. Ricardo Rosselló to resign amid a scandal triggered by the leak of offensive chat messages between him and advisers.

In the leaked messages, Rosselló and his top lieutenants shared a number of homophobic and sexist sentiments, including referring to former New York City Council Speaker Melissa Mark-Viverito as a “whore” in Spanish.

Puerto Rico’s chief fiscal officer, Christian Sobrino Vega, also wrote that Puerto Rican pop superstar Ricky Martin “is such a male chauvinist that he f–ks men because women don’t measure up.”

Rosselló’s administration has been dogged by corruption allegations, with six people, including two former high-ranking officials, charged with conspiracy and other crimes involving millions of dollars in federal Medicaid and education funds.

Rosselló, who took office in January 2017, has refused to resign but announced on Sunday that he would not seek re-election when his terms ends in 18 months and would relinquish his role as head of the New Progressive Party.

With Post wires