Crowds in San Juan set off fireworks and flooded the streets, cheering and waving Puerto Rican flags Wednesday, moments after learning that Gov. Ricardo Rosselló had announced plans to leave office.

Public figures, including 2020 Democratic candidate Bernie Sanders and Puerto Rican-American playwright Lin-Manuel Miranda, shared video of the mass celebrations that ensued after Rosselló announced via the official Fortaleza de PR Facebook page that he would resign, effective Friday, Aug. 2 at 5 p.m.

PUERTO RICO'S GOVERNOR TO RESIGN AMID PROTESTS OVER LEAKED OBSCENE ONLINE CHATS

Crowds already gathered in the streets of San Juan erupted in cheers, waved flags and began chanting a celebratory "Olé" upon hearing the news. Fox News correspondent Bryan Llenas shared video shot moments after Puerto Ricans heard Rosselló’s resignation announcement on their cell phones.

“Fireworks. Cheers. Hugs. Pots banging. Old San Juan erupts in celebration after @ricardorossello resigns on eve of Puerto Rico’s constitution day. @foxnews is here.” Llenas wrote.

A video tweeted by Nick Brown, a Reuters journalist, shows balcony shots of a euphoric crowd in the street while fireworks burst in the sky over San Juan in the background.

“BREAKING: It is official. @ricardorossello will resign effective August 2. Protesters light fireworks, erupt in euphoric cheer. Here is the moment they find out their cries, fraught as they are, have been heard. That Ricky has resigned. #rickyrenuncia #PuertoRico” Brown wrote.

Lin-Manuel Miranda, the Puerto Rican-American playwright famous for creating and starring in the Broadway hit "Hamilton," retweeted Brown’s video. “Look at the fireworks,” he wrote.

Vermont Democrat Bernie Sanders also retweeted Brown's video and wrote: “I congratulate the millions of people in Puerto Rico who came together to demand the resignation of Governor Rosselló. When we stand together, there is nothing we cannot accomplish.”

The governor’s resignation announcement came after more than a week of massive protests calling for his ouster over leaked obscene, misogynistic online chats. The leaked conversations reportedly showed the governor mocking women, homosexuals, political opponents and victims of Hurricane Maria.

CLICK HERE TO GET THE FOX NEWS APP

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.

Fox News’ Bryan Llenas, Andrew O’Reilly, Brie Stimson and the Associated Press contributed to this report.