Puerto Rico Gov. Ricardo Rosselló announced Wednesday evening he will resign on Aug. 2 after nearly two weeks of protests calling for him to step down following revelations of corruption and leaked offensive chat messages members of his administration exchanged about political rivals and journalists.

Crowds outside La Fortaleza, the Governor’s mansion in Old San Juan, rejoiced following Republican Rossello’s announcement of his departure via a Facebook post just minutes before midnight on Wednesday.

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

The homophobic, sexist and otherwise insensitive messages Rossello’s top advisers exchanged only caused greater furor among a Puerto Rican public already upset over a severe debt crisis and the fallout of Hurricane Maria, which struck the territory in late 2017. Puerto Rico is home to around 3 million people, and Hurricane Maria killed nearly 3,000 residents.

SLIDESHOW: TOP DEMOCRATS RUNNING FOR PRESIDENT IN 2020

The protests that rocked Puerto Rico marked the largest on the territory since the demonstrations that ended U.S. Navy training operations on the island of Vieques in 2003.

Rossello, 40, took office as Puerto Rico’s governor in January 2017, and is the territory’s first governor to resign in its modern history. He had already said over the weekend that he would not seek re-election in 2020.

Puerto Rico’s Justice Secretary Wanda Vasquez is expected to succeed Russell as interim governor. Vasquez, who serves as the equivalent of a state attorney general, is a member of the New Progressive Party and formerly worked as a lawyer specializing in domestic violence and sexual abuse.

Puerto Rico has been instituting austerity measures due to a $70 billion debt crisis and an economic recession that has been going on for more than a decade. Several U.S. lawmakers from both parties,  as well as Puerto Rican celebrities like Ricky Martin and Benicio del Toro and rappers Residente and Bad Bunny have called for Rossello’s resignation.