SAN JUAN, Puerto Rico — ­Puerto Ricans draped in their territory’s colors marched into the streets Monday to demand the resignation of their embattled governor, shuttering businesses and paralyzing a major highway in one of the largest demonstration in the Caribbean island’s history.

People protesting years of corruption, government dysfunction and an anemic economy swept into the capital city to the beat of drums, tambourines and maracas, buoyed by the support of the Puerto Rican diaspora on the U.S. mainland and beyond.

Gov. Ricardo Rosselló on Monday reasserted his commitment to stay on the job and carry out plans to battle corruption and “drain the swamp,” even as criticism of his participation in crude text conversations about political opponents, female politicians and victims of Hurricane Maria intensified.

“I’ve apologized for that. I’m making amends . . . for all of the comments that I’ve made on the chats,” Rosselló told Fox News host Shepard Smith. “My commitment is to follow through on some of the efforts that I established for the people of Puerto Rico. That includes establishing a plan that I’ve already circulated within the White House so that we can battle this corruption.”Monday’s demonstration could represent the largest mobilization in the history of Puerto Rico, a colony the United States acquired during the Spanish-American War of 1898. The island has been a self-governing territory since 1952, following the adoption of its constitution a few years after residents elected their first native-born governor.

Listen on Post Reports: Arelis Hernández reports on the political turmoil in Puerto Rico

The masses assembled in San Juan early Monday, with tens of thousands flooding the streets ahead of a planned 9 a.m. start time, while photos and videos of the march inundated social media.

Music blasted as protesters expressed themselves through song, with some people dancing in the roads that had surrendered to the wave of demonstrators.

But President Trump joined those criticizing the governor Monday, denouncing the U.S. territory’s government as “corrupt” and “incompetent.” He called Rosselló a “terrible governor.”

Leaked text messages among Rosselló and 11 of his closest aides included sexist and homophobic language used to denigrate his administration’s opponents and make light of Hurricane Maria’s victims. In the chat, which occurred on the encrypted messaging app Telegram, Puerto Rico’s then-chief fiscal officer Christian Sobrino Vega made a threat, seemingly in jest, to shoot San Juan Mayor Carmen Yulín Cruz.

“You’d be doing me a grand favor,” Rosselló responded.

Cruz, who is expected to run for governor in 2020 as a candidate from the rival Popular Democratic Party — which advocates for greater autonomy from the U.S. government — said in an interview with CNN that it was “impeachment time.”

“The crimes committed by the governor are so horrendous that it cannot wait,” said the mayor, who filed a police report against Rosselló and Sobrino Vega.

The Puerto Rican leader has refused to resign after more than a week of growing protests in the territory’s cities and outside the governor’s mansion in Old San Juan. Rosselló said Sunday that he would not seek reelection in 2020 and would step down as head of the New Progressive Party.

But the announcement did nothing to assuage Puerto Ricans incensed by the leaked group-chat messages.

“Puerto Rico se levantó,” said Marisol Reinosa, invoking the slogan coined in the days after Hurricane Maria to lift spirits — now personified in a literal uprising and a raucous rebuke of the governor. “Puerto Rico has risen.”

Demonstrators and vendors arrived before dawn Monday to park their cars and set up their tables to sell merchandise, food and Medalla, the local beer. People parked vehicles in chaotic configurations under highway ramps and on road medians to join the marching and chanting throngs.

Busloads of protesters occupied all lanes of the expressway in San Juan’s commercial district early Monday, where spontaneous singing, salsa dancing and flag-waving were ubiquitous. Puerto Rican flags — both the traditional banner and a black-and-white version used as a sign of mourning — waved above the crowd.

All around, giant speakers atop trucks blasted the heart-pounding ballad “Preciosa,” sung by Marc Anthony. Whenever the song reached its climax, protesters belted out the lyrics in stirring unison: “Yo te quiero Puerto Rico!”

A slogan calling for the governor’s resignation, “Ricky renuncia,” was everywhere: in hashtags and on hats, on signs and on sidewalks, and on the lips of protesters who hoped they would succeed in driving him from power.

Clutching a large Puerto Rican flag, protester Veronica Caro said she was incredulous about how the governor had disrespected the people.

“We voted for him because he promised to bring a new face to Puerto Rican politics and change things,” said Caro, 31. “But he turned out to be more of the same.”

Sitting next to her was Marta Rivera, a 59-year-old retiree from North Carolina who called the governor “worse than Trump.”

Sin Luz: How Puerto Rico coped with life without power in the wake of Hurricane Maria

Trump became a vocal opponent of Rosselló in the aftermath of Hurricane Maria in 2017, when he denounced the governor’s handling of the crisis amid Rosselló’s requests for more aid. On Monday, Trump said Rosselló’s troubles were evidence that his previous criticisms were fair.

The federal government’s response to the hurricane was widely criticized as slow and ineffective, hampered by logistical and bureaucratic challenges that led to delays in aid distribution. But Monday, Trump repeated a false figure for the amount of disaster aid the federal government provided and boasted about the administration’s response to the storm, that led to an estimated 3,000 Puerto Rican deaths.

“I am the best thing that ever happened to Puerto Rico,” Trump said. “They don’t like to give me the credit for it, but we did a great job.”

Trump seems to inflate the price tag for Puerto Rico’s recovery to deny funding Puerto Rico’s recovery

Former secretary of state Hillary Clinton tweeted her support for Puerto Rico’s protesters Saturday, writing that “like all Americans, they have the fundamental right — and duty — to hold their leaders to account.”

Eduardo Bhatia, another gubernatorial candidate, described the current moment: “Puerto Ricans feel that we are on an airplane right now and the pilot, Rosselló, is erratic, incompetent and a threat to all.”

The only possible response, he said, is to replace him.

Leaders of the Puerto Rico House of Representatives are exploring the possibility of impeaching Rosselló, but it is not clear when or whether proceedings will begin. The governor said he respects the process and welcomes the inquiry. The secretary of state would be next in line to lead the government, but Rosselló has yet to fill the vacancy left by Luis Rivera Marín, who resigned this month because of his connection to the leaked chat.

Residents of the island are growing impatient.

“There is nothing more democratic than exercising our rights to protest and invoking our constitution, which lays out the way to impeachment,” said Amarilis Padilla-Lugo, former director of a health program for the homeless. “Our elected leaders have a responsibility to listen to us.”

The past week has been marked by creative and expressive demonstrations, from scuba divers holding protest signs under the crystal-blue waters of the Caribbean Sea to residents across the island banging pots outside their windows in unison every night at 8 p.m.

The protests have morphed from a targeted repudiation of Rosselló to an expression of all the grievances Puerto Ricans have harbored for years: The debt. The economy. The unelected federal oversight board managing the territory’s finances. The lack of opportunity for young people.

Lucia Crespo, 15, came to the march Monday with her mother, carrying a sign in English lamenting the fact that she had to leave Puerto Rico in 2015 because there were few prospects for her family after her father lost his job. She now lives in Denton, Tex. But she would rather be home.

“We moved there for a better life, but we want to come back,” she said. “But it’s just impossible, and it’s really sad.”

On Monday, Azalea Ramos and Valerie Santos sang along with the crowd on Franklin Delano Roosevelt Avenue in downtown San Juan. They are both students at local universities, one public, the other a private institution.

They said the parties that dominate the island’s politics, which are aligned along the question of Puerto Rico’s U.S. status — the New Progressive Party, statehooders who wish for Puerto Rico to join the 50 states; and the Popular Democratic Party — don’t represent them.

“It doesn’t end here,” said Santos, 20, taking in the celebratory scene around her. “All of this is a spotlight, so people can see that there is no way we will allow anyone to take advantage of us again.”

Epstein reported from Washington. Adriana Usero contributed from Washington.

Read more:

Puerto Rico is in chaos, and some worry continued instability is a major threat

Global Opinions: Puerto Rico’s governor needs to step down

Unpaid workers and complaints of shoddy construction plague hurricane recovery on U.S. Virgin Islands

From 2017: Trump called San Juan’s mayor a weak leader. Here’s what her leadership looks like.