Embattled Puerto Rico Gov. Ricardo Rossello resigns after weeks of protests originally appeared on abcnews.go.com

Gov. Ricardo Rossello, the embattled leader of Puerto Rico, has resigned after weeks of protest and multiple declarations he would remain in office through January 2021.

Rossello, who has faced intense pressure from protesters and politicians to step down after the leak of offensive text messages between the governor and his top aides, made the announcement in a livestreamed message late Wednesday.

His resignation is effective Aug. 2 at 5 p.m.

He and his staff are accused of making homophobic, misogynistic and sexist comments against opponents and critics and mocking victims of Hurricane Maria.

(MORE: Demonstrations in Puerto Rico turn violent as tear gas fired at protesters)

In a lengthy message, Rossello cited the accomplishments of his administration when it comes to infrastructure, corruption reforms and LGBT rights. He also noted the challenges the island faced after Hurricanes Irma and Maria.

"I hope that this decision will serve as a call for citizen reconciliation that we need so much to move forward with the welfare of Puerto Rico as its north," Rossello said in the remarks announcing his resignation. "I complete my mandate and the most I desire is peace and progress."

Secretary of Justice Wanda Vazquez will become the next governor of Puerto Rico.

"I understand he made the right decision, for the good of both his family and for Puerto Rico, as I let him know," Vazquez said in a statement. "He just announced that this resignation will not be effective today. We will be working together to have a responsible and transparent transition process."

The streets of San Juan have been filled with protesters over the past 11 days. Tens of thousands turned out to massive protests on Monday, which ended in police firing tear gas at some protesters late in the night.

PHOTO: Demonstrators pose for a photo during march on Las Americas highway demanding the resignation of governor Ricardo Rossello, in San Juan, Puerto Rico, Monday, July 22, 2019. (AP Photo/Dennis M. Rivera Pichardo) More

The governor's resignation comes after Ricardo Llerandi, Rossello's chief of staff, announced Tuesday he was resigning, which will go into effect on July 31. Llerandi was one of the two government aides who survived the firings after the release of nearly 900 pages of Telegram group chats that prompted outcry.

"The people have spoken," San Juan Mayor Carmen Yulin Cruz, one of the targets of Rossello's vulgar chats, told ABC News. "Justice has prevailed. Puerto Ricans have shown the world that there is nothing that a people united cannot accomplish. Puerto Ricans have shown the world that evil can be defeated and that the power is in the streets. We are witnessing the birth of a new era a new sense of pride and a new principle of governance. I am prouder than ever today to be Puerto Rican."

Protesters made it clear that the resignation they sought was that of Rossello. Three days before his announcement, the governor said in a video address he would not step down in the face of protests, but also would not seek reelection in 2020.

He also stepped down as the leader of the New Progressive Party. The announcement had the opposite of its intended effect, with protesters turning out in droves the following day.

PHOTO: In this July 16, 2019 file photo, Puerto Rico Gov. Ricardo Rossello, accompanied by his chief of staff Ricardo Llerandi, right, attends a press conference in La Fortaleza's Tea Room, in San Juan, Puerto Rico. (AP Photo/Carlos Giusti, File) More

Reports of Rossello's possible resignation prompted cheers from hundreds of protesters Tuesday evening, but the official announcement didn't come for 24 hours.

"We want a government that really represents us, that is working there for the people of Puerto Rico and not for their own benefit and the benefit of their own friends," protester Daphne Lebron told ABC News on Monday.

(MORE: Luis Miranda on why Puerto Rico's protests are an important moment in history)

Story continues