Puerto Rico’s Governor Ricardo Rosselló has resigned.

Rosselló found himself in hot water after text messages containing homophobic and sexist language exchanged in a group chat with 11 cabinet members and aides leaked earlier this month, adding to existing public anger over alleged corruption.

In several messages, Rosselló referred to people as ‘cocksuckers’. In one message, he said senator Eduardo Bhatia had “historic cocksucker levels” and in another message he said journalist Benjamín Torres Gotay was an “unprecedented cocksucker.”

The nearly 900 pages of messages, obtained by Puerto Rico’s Centre for Investigative Journalism, even featured an attack on Puerto Rican singer Ricky Martin.

“Nothing says patriarchal oppression like Ricky Martin,” wrote Rosselló’s finance minister at the time, Christian Sobrino. “Ricky Martin is such a male chauvinist that he fucks men because women don’t measure up. Pure patriarchy.”

Rosselló had already confirmed that he wouldn’t stand for re-election next year, but after weeks of mass street protests calling for his removal from power – with stars like Martin and Bad Bunny taking part – he’s now officially announced his resignation.

“My only priority has been the transformation of our island and the well-being of our people,” Rosselló said in his announcement, which was broadcast on Facebook Live just before midnight on Wednesday (24 July) in Puerto Rico.

“The demands have been overwhelming and I’ve received them with highest degree of humility.”

Rosselló confirmed he will step down on 2 August “to allow for an orderly transition”. He will be replaced by Puerto Rico Secretary of Justice Wanda Vázquez.