City Council Speaker Melissa Mark-Viverito posed in a red cap last week at the Democratic National Convention.

“Immigrants Make America Great,” it read, a play on Donald Trump’s campaign slogan.

The East Harlem Democrat hasn’t been shy about criticizing the Republican presidential nominee’s policies as discriminatory — in front of Trump Tower at home in Manhattan or on the road as a surrogate for Hillary Clinton.

She also is a fierce advocate for Puerto Rico amid its debt crisis, speaking in New York City, in Florida and on the island.

With her term expiring next year, she has begun to weigh what she will do next.

“I keep all my options open. I definitely want to continue to be very active locally in New York City, to be involved in changes that happen here,” Mark-Viverito told Newsday in an interview. “I don’t know what I’m going to be doing. And you never know what may happen or what may emerge.”

The causes she has tackled beyond the traditional responsibilities of the speaker post provide some clues. And backers have pressed her to consider a variety of roles such as a position in the would-be Clinton administration, the governor seat in Puerto Rico and higher office in New York.

But she appears to have spotty support at home in East Harlem — her endorsement didn’t help congressional candidate Adriano Espaillat win in the district — and she has angered groups that would be her natural allies on areas including policing.

Mark-Viverito, 47, the first Hispanic elected official to serve in a citywide post, appeared to embrace her role as a Clinton delegate in Philadelphia. She danced to Lenny Kravitz, stood onstage as the Democratic Party celebrated its diversity and spoke at panels on the dangers she said Trump poses to Latinos.

Council finance chairwoman Julissa Ferreras-Copeland (D-Queens), who has been floated as the next council speaker, said she hoped Clinton would be looking at Mark-Viverito’s record “and perhaps finding a place for her.”

Mark-Viverito endorsed Clinton last fall with an op-ed in a Spanish-language newspaper in Puerto Rico.

She has been among the island’s most visible defenders, traveling to the capital to speak against the fiscal control board that Congress created to restructure Puerto Rico’s $70 billion debt.

On the island where Mark-Viverito was born and where she owns property, people “stop her on the street and they thank her for speaking out for us,” said Pedro Julio Serrano, who recently left his post as City Council aide to advise San Juan’s mayor and police department. “People feel that she’s powerful, that she’s conveying what our feelings are and at a level where she can speak with congressman and senators.”

Mark-Viverito’s wish to stay politically active in the city could also mean she would run for Congress or, less likely, challenge Mayor Bill de Blasio in 2017, political experts said.

Adriano Espaillat, the state senator she backed to replace longtime Rep. Charles Rangel and become the first Dominican-American in Congress, applauded her work as a “bridge-builder” to Latino groups beyond Puerto Ricans. Like many others interviewed, Espaillat called her “principled,” whatever the issue.

Angelo Falcón of National Institute for Latino Policy said she has taken on issues that they could endanger her prospects.

He cited what he said were far-left positions such as her campaign to free Oscar López Rivera, a Puerto Rican nationalist and member of the Armed Forces of National Liberation, serving a 75-year federal sentence for “seditious conspiracy.”

“In terms of mainstream Democratic politics, that could cost her,” Falcón said, adding that she isn’t entirely popular in East Harlem, where he said some view her as aloof and arrogant.

The district is one of the poorest in the city, and though Mark-Viverito champions policies for the low-income and disadvantaged, she is one of the wealthiest members of the council.

Hank Sheinkopf, a Democratic consultant who advised Espaillat rival Keith Wright in the April 28 congressional primary, said she won’t be as influential when she sheds her speaker title.

He pointed out she was elected to a local post and ascended to the leadership position through an internal vote.

“The speaker’s power dissipates when the person is no longer speaker,” Sheinkopf said, pointing to the failed attempts at higher office of former speakers Christine Quinn, who ran for mayor, and Peter Vallone Sr., who ran for governor and mayor.

Mark-Viverito said the common driver behind her work is ensuring others have the “same rights . . . that I want to be given as a human being, as a person, as a woman.”

Not everyone sees it that way.

She raised the ire last month of anti-police brutality activists by nixing a council vote on legislation requiring police to identify themselves via business cards in stops and notify those they search on their right to refuse. Instead, she brokered a deal with the NYPD, which promised to make changes internally.

The mothers of black men killed in encounters with NYPD slammed the agreement as a toothless version of the bills, and Constance Malcolm, mother of Ramarley Graham, said Mark-Viverito was making “backdoor deals with the police commissioner, the devil himself.”

The speaker said she acted on her principles, and always will.

“There are times that you have to compromise,” she said. “But as long as you’re clear about why you’re doing things, as long as you don’t compromise those core values that are truly important to you, that’s life, right?”

With Matthew Chayes