Puerto Rico's governor said on Sunday he would not seek re-election next year and would step down as head of his party following nine days of sometimes violent protests demanding his resignation over vulgar chat messages.

A day before a planned general strike and more demonstrations in the U.S. island territory, Ricardo Rossello said he respected the wishes of Puerto Ricans and would not run for another term in 2020 elections.

He also said he would resign as head of his New Progressive Party but would remain as governor until the end of his term.

"I know that apologizing is not enough. It is only my work that will help restore the confidence of those sectors on the way to true reconciliation," Rossello said in a Facebook Live video.

In the online chats published on July 13, the center-right governor and his allies referred to politicians, celebrities and ordinary Puerto Ricans in misogynistic, homophobic and vulgar terms.

Anger over the messages has tapped into simmering resentment over Rossello's handling of devastating 2017 hurricanes, allegations of corruption in his administration and the island's fragile recovery from bankruptcy.

Puerto Rico's nonvoting representative to the U.S. Congress, as well as Democratic presidential candidates and some Republican lawmakers, have demanded he step down over the leaked messages.

The speaker of Puerto Rico's House of Representatives set up an independent panel on Friday to investigate whether the chats constituted crimes or warranted impeachment. He gave the panel 10 days to deliver their findings.

"I have to respect the constitutional order and welcome the process started by the legislative assembly, which I will confront with all truth and force in a responsible way," Rossello said in the video.