Ricardo Rosselló, the embattled governor of Puerto Rico, announced on Wednesday that he will resign on Aug. 2, after more than a week of massive protests calling for his ouster over leaked obscene, misogynistic online chats.

Rosselló took to Facebook Wednesday to announce that his resignation will go into effect at 5 p.m. on Friday.

Puerto Rico’s Department of Justice confirmed to Fox News Tuesday that search warrants had been issued in an investigation into the governor and 11 of his aides over whether they committed any crimes related to offensive, obscenity-laden online chats that were released.

PUERTO RICO JUDGE ISSUES SEARCH WARRANTS FOR EMBATTLED GOVERNOR AND AIDES AS PROTESTS CONTINUE

The leaked conversations reportedly showed the governor mocking women, homosexuals, political opponents and victims of Hurricane Maria.

In one message, Rosselló reportedly called one New York female politician of Puerto Rican descent a “w---e” and described another as a “daughter of a b---h.” One chat included vulgar references to Latin pop star Ricky Martin’s homosexuality.

On Monday, Rosselló told Fox News he took responsibility for allegations of corruption from his own people but said he would not resign. Over the weekend, he said he would not seek re-election.

CLICK HERE TO GET THE FOX NEWS APP

More than a dozen officials have already resigned since the chats were leaked.

Fox News’ Andrew O’Reilly and the Associated Press contributed to this report.