The embattled governor of Puerto Rico Ricardo Rosselló announced he is resigning amid protests calling for him to leave office. Rosselló came under fire after about 900 pages of chats between the governor and other Puerto Rico officials were leaked, revealing a pattern of incendiary language that took place over several years.

Rosselló's resignation is effective Aug. 2, he announced on a video message just before midnight Wednesday evening.

"My only North Star has been the well-being of my island," Rosselló said in Spanish. "What I wish most is peace and progress for my people."

Celebrations broke out on the streets of San Juan after people heard the announcement. "Ricky, te botamos!" the revelers cheered, which translates to "Ricky, we threw you out!"

Rosselló, 40, was elected governor of Puerto Rico in 2016. He is also the first governor to resign in the U.S. territory's history. Justice Secretary Wanda Vázquez will now take over as governor of the island, which contains 3.2 million U.S. citizens.

Vasquez, who is the equivalent to a state attorney general, is a controversial figure herself. She faced criminal charges after allegedly interfering in a case involving her daughter, although she was later cleared of those charges. She has also been accused of mishandling and or delaying prosecutions of members of her own political party, the New Progressive Party.

Hundreds of thousands of protesters in San Juan marched over the weekend calling for Rosselló to resign, citing years of chats that included homophobic and misogynistic comments, jokes about silencing journalists, and even one jest about murdering an opposing politician. Other chats mocked citizens of Puerto Rico displaced by Hurricane Maria in 2017.

Citizens of Puerto Rico expressed concern that Rosselló's chat behavior went beyond a lack of professionalism and showed a total disregard for politics without scandal. They claimed his language and insinuations violated the trust they should have in the leader of the U.S. territory.

Puerto Rico's legislature vowed to begin impeachment proceedings if Rosselló refused to resign, as he did earlier this week. However, reports early on Wednesday predicted that Rosselló, 40, would resign by the end of the day.

Several members of Rosselló’s administration involved in the leaked chats have resigned already, including his press secretary, chief of staff, and secretary of state Luis Rivera Marín who would have succeeded Rosselló.