Nearly two years ago, Hurricane Maria exposed the raw dysfunction of Puerto Rico, collapsing long-neglected infrastructure and leaving several thousand dead on Gov. Ricardo Rossello's watch.

Last week, two of his top former officials were arrested by the FBI on corruption charges.

But the scandal that is threatening to buckle the boyish 40-year-old governor now centres on a profanity-laced and at times misogynistic online chat with nine other male members of his administration in which some of the U.S. territory's most powerful men act like a bunch of teenagers. The leak of at least 889 pages of the private chat has sunk Rossello into the deepest crisis of his career.

The scandal has been dubbed "Chatgate" or "Rickyleaks." Using the encrypted messaging app Telegram, Rossello calls one New York female politician of Puerto Rican background a "whore," describes another as a "daughter of a bitch," and makes fun of an obese man he posed with in a photo. The chat also contains vulgar references to Puerto Rican star Ricky Martin's homosexuality and a series of emojis of a raised middle finger directed at a federal control board overseeing the island's finances.

Thousands of protesters have marched in the capital in recent days to call for Rossello's resignation. Police tried to disperse the marchers with pepper spray in front of the Fortaleza governor's residence, which was protected by barricades.

Citizens riot near the executive mansion, demanding Rosello's resignation, in San Juan on Monday night. (Carlos Giusti/Associated Press)

The leaders of the U.S. territory's house and senate said they weren't planning impeachment proceedings, but an influential association of mayors from Rossello's pro-statehood party said he had lost their support.

The governor repeated at a news conference on Tuesday that he has no plans to resign.

"I have not committed an illegal act and I have not committed an act of corruption," he said. "I committed some improper acts and I asked forgiveness for that."

Late Monday, Rossello released a statement saying he respected the protests and was taking their message into account.

Entertainers join resignation calls

Puerto Rican artists Benito A. Martinez Ocasio, known as Bad Bunny, and Rene Perez, known as Residente, both said on Twitter they planned to return to Puerto Rico to join the protests.

Playwright Lin-Manuel Miranda, whose production of Hamilton on the island is mentioned in the chats, called them "a very disturbing portrait of how this Administration operates."

"Puerto Rico deserves better," he said in a tweet. "Those of us in the diaspora are committed to continue pushing Puerto Rico's agenda but as we fight the good fight, we need a Governor that will be respected in the halls of Washington and in the streets of El Barrio."

Martin, in a tweet in Spanish, urged Rossello to "give up your office to another person with the wisdom and leadership of directing our destiny as a people."

Haga un acto de verdadera generosidad, valía y amor por Puerto Rico y ceda su cargo a otra persona con la sabiduria y liderazgo de dirigir nuesto destino como pueblo. —@ricky_martin

Even if Rossello survives until election day next year, it seems clear to many observers that he has been profoundly weakened and less able to deal with crises ranging from the island's bankruptcy proceedings to its continued efforts to receive federal funding to help recovery from Maria.

Chatgate erupted a day after Rossello's former secretary of education and five other people were arrested on charges of steering federal money to unqualified, politically connected contractors. Starting Thursday, an anonymous person or people with access to the chats leaked dozens of pages of them to two local outlets. On Saturday, Puerto Rico's Center for Investigative Journalism published 889 pages.

In the chat group were:

Luis Rivera Marin, Rossello's secretary of state.

Christian Sobrino, who held a series of important economic posts.

Carlos Bermudez, a former communications aide.

Edwin Miranda, a communications consultant.

Interior Secretary Ricardo Llerandi.

Public Affairs Secretary Anthony Maceira.

Elias Sanchez, one-time representative to the board overseeing Puerto Rico's bankruptcy.

The group mentions then New York city council Speaker Melissa Mark-Viverito, who had criticized Democratic Party head Tom Perez for opposing Puerto Rican statehood, with Rossello calling her the Spanish word for "whore."

Referring to Carmen Yulin Cruz, the mayor of San Juan who had announced her intent to run against Rossello in 2020, the governor says, "She's off her meds."

"Either that, or she's a tremendous HP," he continues, using the Spanish initials for "son/daughter of a bitch."

Follows corruption charges

Federal officials said last week that former education secretary Julia Keleher, former Puerto Rico Health Insurance Administration head Angela Avila-Marrer, businessmen Fernando Scherrer-Caillet and Alberto Velazquez-Pinol, and education contractors Glenda E. Ponce-Mendoza and Mayra Ponce-Mendoza, who are sisters, were arrested by the FBI on 32 counts of fraud and related charges.

Puerto Rico governor Ricardo Rossello is shown last week at a news conference addressing allegations by federal authorities that the island's former secretary of education and five other people on charges of steering federal money to unqualified, politically connected contractors. The news conference occurred before the chats were unearthed. (Carlos Giusti/Associated Press)

The alleged fraud involves $15.5 million US in federal funding between 2017 and 2019. Thirteen million was spent by the Department of Education during Keleher's time as secretary while $2.5 million was spent by the insurance administration when Avila was the director.

Despite widespread cynicism in Puerto Rico about politicians' corruption and self-dealing, the chat shocked residents in a way that other scandals haven't, particularly given Rossello's image as a gentle, even meek family man, said Mario Negron Portillo, a professor at the University of Puerto Rico's school of public administration.

"Everyone woke up one day and the governor was spouting vulgarities," he said. "There's nothing worse for a politician than losing legitimacy. I think Ricardo Rossello has lost legitimacy."

Rivera Marin, Sobrino, Bermudez and Miranda have already resigned or been fired.

Rossello, the son of former governor Pedro Rossello, said in a radio interview Monday that "I'm committed to keep working.

"I know some people think differently, but I've determined that it's better to keep working without distraction, dealing with all the different issues that this situation has created."

The president of the commonwealth's House of Representatives, Carlos Mendez Nunez, said Sunday night that legislators from Rossello's pro-statehood New Progressive Party, which has a majority in both houses, did not support starting impeachment proceedings against the governor.

Mendez Nunez said Rossello had been given a one-week deadline to reflect, show contrition and prove he could continue to govern.

"This week he'll meet with mayors, with legislators, and we have to give him this time," Mendez Nunez said. "Impeachment isn't on the table yet. But we reserve the right to evaluate if that's merited."