SAN JUAN, Puerto Rico — Zohran Mamdani ally Linda Sarsour called for the ouster of Israel-supporting Democrats in fiery remarks Thursday at the SOMOS political conference.

Sarsour, the radical, hateful left-wing activist, and Alexa Aviles, a Democratic Socialists of America member of the City Council, made the incendiary remarks during a panel at the annual multi-day conference in Puerto Rico.

“You do the right thing, you keep your job. You don’t do the right thing, you don’t keep your job,” Sarsour said, arguing that any Democrats who don’t oppose Israel should be nudged aside.

Linda Sarsour and Zohran Mamdani.Linda Sarsour called for the ouster of Israel-supporting “corporate Democrats” in fiery remarks during an event called “Colonialism, Resistance and Solidarity: Puerto Rico and Palestine.” Linda Sarsour/ Instagram

Linda Sarsour speaking to protesters in Times Square against the detention of Mahmoud Khalil.Sarsour (above) and Alexa Aviles, a DSA member of the City Council, have been major backers of Zohran Mamdani. James Keivom

“There are some people that will do the right thing for the wrong reasons, but we don’t care why you do the right thing as long as you do the right thing,” she said.

“If you do it because you’re think you’re getting primaried, that’s okay with us.”

Aviles — who is exploring challenging incumbent Manhattan Rep. Dan Goldman (D-NY) — said activists need to root out “corporate Democrats” backed by the American Israel Public Affairs Committee.

She even claimed AIPAC was controlling members of Congress and parts of the media.

“We see a Congress that is very much controlled by AIPAC, who’s controlling all the right-wing media and all the conservative as (well as) a lot of corporate Democrats, maybe almost all of them,” Aviles said during the event called “Colonialism, Resistance and Solidarity: Puerto Rico and Palestine.”

“We need to follow the money because super PACs are here and they’re real. We need to see who’s funding who,” she said.

Sarsour and Aviles have both been major backers of Mayor-elect Mamdani, who is also a card-carrying DSA member.

Mamdani was set to attend a reception at SOMOS — where New York politicos are hobnobbing after Tuesday’s election — hosted by embattled state Attorney General Letitia James later Thursday.

Gov. Kathy Hochul will be delivering remarks at a separate reception Thursday evening.

Sara Forman, executive director of Jewish advocacy group New York Solidarity Network, said the remarks from Sarsour and Aviles show anti-Israel activists and lawmakers are feeling emboldened after Tuesday’s election win for Mamdani, who has consistently bashed the Jewish state.

“This was about muscle flexing post-election,” Forman, who was at the Thursday morning panel, told The Post.

Incumbent legislators have been gearing up for possible primary challenges from the far-left next year.

The city’s DSA chapter has already voiced support for a potential run by Aviles against Goldman, who has voiced strong support for Israel, but has criticized its prime minister, Benjamin Netanyahu.

Goldman, a moderate who reps parts of Manhattan and Brooklyn, is among several office-holders who could face a challenge from the left-plank of the Democratic Party, including from DSA comrades.

State Sen. Jessica Ramos (D-Queens), who faced backlash for backing former Gov. Andrew Cuomo in June’s Democratic mayoral primary, is expected to face a challenge from state Assemblymember Jessica González-Rojas (D-Queens).

Gonzalez-Rojas is a member of the DSA’s city chapter, but has not been endorsed by the group, according to reports.  

House Minority Leader Hakeem Jeffries (D-Brooklyn), state Sen. Andrew Gounardes (D-Brooklyn) and state Assembly members Erik Dilan (D-Brooklyn), Stefani Zinerman (D-Brooklyn), Jenifer Rajkumar (D-Queens) and Michael Benedetto (D-Bronx) have all been subject to political chatter they could be primaried next year.

“We’ll definitely be having races next year and looking to expand our footprint in the state legislature, which is a net win for New Yorkers,” state Sen. Jabari Brisport, a DSA member and Mamdani ally, told Politico Tuesday. 

Former Obama aide and failed mayoral candidate Michael Blake also announced Wednesday he is challenging Rep. Ritchie Torres (D-Bronx), arguing the incumbent is too focused on AIPAC and not the South Bronx.

— Additional reporting by Carl Campanile