Puerto Rico's Gov. Ricardo Rosselló resigned from office late Wednesday night, capitulating in the face of massive protests in the streets, multiple corruption probes into his government, and an imminent impeachment proceeding.

Rosselló announced that he will officially leave office on August 2 in a Facebook Livestream, putting to end days of speculation that his resignation was imminent. In the video, the governor said that while he believed he would "prevail against any accusation or process," he reached the decision to resign after he "heard the demand of the people," according to The New York Times.

Rosselló is the first governor to resign from that office in the history of the U.S. territory.

The Puerto Rican constitution says that the secretary of state is first-in-line to succeed the governor, but that office is currently vacant because its previous occupant also resigned after being implicated in the same private group chat scandal that brought down the governor.

Thus, Secretary of Justice Wanda Vázquez, second-in-line to succeed the governor, is expected to take over as governor. Vázquez, who was appointed in 2017, is widely seen as loyal to Rosselló and has agreed to recuse herself from any criminal investigation into the group chat, which mentioned her name, according to NBC.

Puerto Ricans across the island were jubilant at the news of the governor's resignation, cheering in streets across the U.S. territory. Some of them are now calling for the resignation of Vázquez as well to completely purge the government of Rosselló loyalists.

This was the moment thousands of protesters, standing in front of the governors mansion, tonight, heard the governor say he is resigning pic.twitter.com/PhmVDGpe4A — David Begnaud (@DavidBegnaud) July 25, 2019

San Juan, Puerto Rico. Right now.



The people are back.



pic.twitter.com/2LNI9zuQuF — Joshua Potash (@JoshuaPotash) July 25, 2019

The beginning of the end for the governor started a few weeks ago when six Puerto Rican officials, including the former education secretary, were indicted for corruption charges. The arrests were seen as emblematic of a culture of corruption that plagued the island's government and bureaucracy.

Days after the indictments, investigative journalists released nearly 900 pages of secret group chat messages that included the governor, cabinet officials, and other power players in the Puerto Rican government. The messages were shockingly homophobic, misogynistic, and disrespectful to constituents, activists, and opposition members.

The back-to-back scandals shocked Puerto Ricans, enflaming their long-held frustrations stemming from the island's slow recovery from Hurricane Maria, poor economy, and rampant corruption. Soon, people were marching on the street for nearly two weeks straight, calling for the resignation of the governor and structural reforms to the island's governing structure.

The Puerto Rican anger reached a high point on Monday, when roughly half-a-million people marched in the streets, occupying the island's busiest highway and surrounding the governor's mansion. The demonstrations, which were mostly peaceful, turned more chaotic on Monday evening when protesters threw objects at police protecting the mansion and the police responded by firing tear gases.

Wow. Puerto Rico.

You don’t get this perspective from the ground.

They are Loud.

Determined.

United. pic.twitter.com/3JMmbc8NY2 — David Begnaud (@DavidBegnaud) July 22, 2019

The mass mobilization prompted Puerto Rico's legislature to move toward impeaching the president. Three attorneys appointed by Carlos Méndez Núñez, president of Puerto Rico's house of representatives, determined from the leaked group messages that the governor committed five offenses, including misusing public funds and resources for partisan ends.

Núñez has said that he would begin the impeachment process on Thursday afternoon if the governor did not resign by then.

The governor also faced several corruption probes into his administration. Puerto Rico's department of justice, for instance, demanded the cellphones of Rosselló and his associates.