A texting scandal involving Rosselló sparked nearly two weeks of massive anti-government protests in the US territory after years of alleged corruption, a debt crisis and Hurricane Maria. Here are the events that led to his resignation:First leaked messages are publishedJuly 10Two former Puerto Rico officials, the island’s education secretary and the head of the health insurance administration, were arrested on corruption charges. They were accused of directing millions of dollars in government contracts to politically connected contractors.Read MoreJuly 11After the arrests, the governor returned home from a previously scheduled family vacation outside the US territory and a few messages from a private Telegram chat with his inner circle were leaked. He apologized for referring to a former New York official with an expletive in those messages.”I want to apologize for the expressions that I wrote in a private chat,” Rosselló told reporters. “I’m the governor of Puerto Rico but I’m also a human being with my failures and my virtues.”Gov. Ricardo Rosselló apologized for the languaged he used in leaked messages.More leaked chats fuel unrestJuly 13The Puerto Rico’s Center for Investigative Journalism published nearly 900 pages of derisive and offensive private chat messages between Rosselló and members of his inner circle. The exchanges from the messaging app Telegram ridiculed numerous politicians, journalists and celebrities in a scandal many called “RickyLeaks,” after the governor’s nickname. The messages were sent in December 2018 and January 2019.Two Cabinet members who were part of the chats, Puerto Rico’s former chief fiscal officer Sobrino Vega and Secretary of State Luis Rivera Marin, resigned.Crowds flooded the streets of Old San Juan carrying Puerto Rican flags and signs that read “Ricky Resign” in Spanish.July 14Protests began to grow outside Rosselló’s official residence, known as La Fortaleza, following the release of the leaked texts. The protesters called for Rosselló to resign.July 15Police fired tear gas into crowds of protesters calling for his ouster. Protesters filling the street in front of the governor’s mansion in Old San Juan clashed with police.Governor apologizes but won’t resignJuly 16Rosselló announced he would not step down. In a news conference, he also defended the actions of police and accused protestors of unleashing tear gas and setting fires during demonstrations the night before. “I will continue my work and my responsibility to the people of Puerto Rico,” the governor told reporters.Rosselló called for a press conference hours after police clashed with protesters.Celebrities join protestsJuly 17Puerto Rico’s Justice Department issued summonses for everyone involved in the private chat group with Rosselló.Ricky Martin waves a small Puerto Rican flag as he joined the protest in Puerto Rico. Latin trap artist Bad Bunny left his European tour and joined protests in San Juan. Ricky Martin, rappers Residente and iLe also marched with hundreds of people from Puerto Rico’s Capitol building to the governor’s mansion.Bad Bunny, Residente and iLe released a protest anthem, “Afilando los Cuchillos” (“Sharpening The Knives”) on YouTube. “Hamilton” creator Lin-Manuel Miranda, who also is mentioned in the chats, attends a parallel protest in New York City. As the protests continued, demonstrators clashed once again with police in the streets of Old San Juan.Once again, officers used tear gas to push protesters back during an intense standoff in front of the governor’s mansion.Governor asks for forgiveness July 18Rosselló tweeted a statement saying he respects the people’s right to protest and their actions have “not gone unnoticed.” He also asked the Puerto Rican people for forgiveness.July 19The president of Puerto Rico’s House of Representatives, Carlos “Johnny” Méndez, created a special committee to advise him on whether the governor committed impeachable offenses based on the leaked messages.July 21Rosselló announced he will not run for re-election in 2020 and resigned from his role as president of the New Progressive Party.”A huge portion of the population is unhappy and I recognize it,” Rosselló said on Facebook Live. “I’ve heard you, I love the island and people. … Today I have the responsibility to direct my strengths to try to find alternatives so that with God we may be able to move forward.”Unrest intensifiesJuly 22Hundreds of thousands of people shut down a major highway in San Juan and and launched an island-wide strike demanding Rosselló’s resignation. An aerial view from a drone shows thousands of people as they fill the Expreso Las Américas highway in San Juan.Protests were ongoing for about a week but demonstrators said they were not going to rest until Rosselló left office. They spanned many generations and political leanings. They said they were not backing up because they’ve endured political corruption, high poverty rates, crushing debt and a painful recovery since Hurricane Maria struck in 2017.July 23Rosselló’s chief of staff submitted his resignation, effective July 31, according to a letter obtained by CNN. Reports saying the governor was planning to resign by the following day started circulating.July 24An energetic crowd awaiting the governor’s anticipated announcement filled the streets outside the governor’s mansion waving flags and banners throughout the day.Protesters in the streets of Old San Juan were watching the governor’s message on their phones.Near midnight, Rosselló announced his resignation — effective August 2 — in a recorded message posted on social media. The governor is two and a half years into his four-year term.Crowds celebrated in front La Fortaleza shortly after Rosselló announced his resignation.