Puerto Rico Gov. Ricardo Rosselló announced his resignation effective Aug. 2 amid a scandal over sexist, homophobic and otherwise offensive text messages he and his inner circle exchanged reported Bobby Allyn and Scott Neuman for NPR.
The leaked texts set off mass demonstrations and widespread calls for his departure.
"I was willing to face any challenge, fully understanding that I would prevail against any accusation or process," Rosselló, a Democrat who was elected in 2016, said late Wednesday.
Earlier this week, he had promised not to seek a second term, but he acknowledged that he had "heard the demand of the people."
"I hope this decision serves as a call to citizen reconciliation," he added.
Rosselló will officially step down on Aug. 2.
His resignation comes after nearly two weeks of street protests, including hundreds of thousands of people who shut down an 11-lane highway in San Juan.
Justice Secretary Wanda Vázquez, an official who protesters say is tainted by her ties to the governor, is expected to replace Rosselló. The job would have fallen to the territory's secretary of state, but Luis Rivera Marín resigned from that position earlier this month in the wake of the scandal.