Mayor Zohran Mamdani and United Auto Workers President Shawn Fain are flexing their political power and backing a democratic socialist in a high-profile race to replace Rep. Nydia Velázquez in a district that covers Brooklyn and Queens.

Both men plan to appear with Claire Valdez, a 36-year-old state assemblymember from Queens, at an event in Brooklyn on Friday. Mamdani and Fain’s support amounts to a powerful boost from the progressive left and labor.

In an interview with Gothamist, the mayor said he had been impressed with Valdez’s history as an organizer in the local chapter of UAW when she worked at Columbia University.

“I truly believe that we need a labor organizer in Congress,” Mamdani said. “We need someone who will put forward that same agenda for the working class, whether it's legislation to make it easier to join a union or to fight for Medicare for All.”

He added that he was confident Valdez would connect with voters in a district he said has “long been on the front lines of the progressive movement.”

In a statement, Fain called Valdez a working-class fighter who would “take on the billionaire class and take back what’s ours.”

The seat has long been represented by Velázquez, a trailblazer who was the first Puerto Rican elected to Congress. In November, she announced she would not run for reelection, in order to make way for a younger generation of progressive leaders.

Mamdani, who like Valdez is a democratic socialist, had been expected to endorse her. He encouraged her to run for the state Assembly and she was among his earliest mayoral campaign supporters.

By announcing his endorsement one day after Valdez launched her campaign, Mamdani is showing a willingness to shape a race that will test the popularity of the Democratic Socialists of America, as well as his own. Last month, Mamdani announced his support for former City Comptroller Brad Lander in his bid to unseat Rep. Dan Goldman in a district that covers Lower Manhattan and Brooklyn.

Mamdani performed strongly with voters in Velázquez's 7th District, which includes Astoria, Williamsburg, Greenpoint and Bushwick.

Valdez will face a primary battle against Brooklyn Borough President Antonio Reynoso, a progressive with deep ties to the Democratic establishment.

Mamdani said he had “great respect” for Reynoso, but added: “I think that Democratic primaries for an open seat are an opportunity to respectfully and thoughtfully shape the future of the party.”

Valdez praised both Fain and Mamdani for their abilities to organize pro-labor movements.

“The mayor’s support will help us carry that fight forward in Congress for working people,” she said in a statement.

Correction: This story has been updated to correct the spelling of Shawn Fain's name.