Council Speaker Melissa Mark-Viverito and Congresswoman Nydia Velazquez today both tore into Vermont Sen. Bernie Sanders’ voting record on immigrant issues—which they lambasted as “straight from the Republican anti-immigrant playbook.”

Talking to the media in a conference call, the two Hillary Clinton supporters upheld the former secretary of state as a “champion for Latinos” and for a pathway to citizenship for undocumented immigrants. This they contrasted with the underdog democratic socialist’s votes against a 2007 immigration reform package in the Senate, for the 2006 Community Protection Act—which, according to the Congressional Research Service would have permitted “indefinite detention of specified dangerous aliens”—and for a 2006 amendment in the House that banned the U.S. government from notifying Mexican authorities about the activities of the border-patrolling Minutemen group.

“He voted with the anti-immigrant right wing,” Ms. Mark-Viverito said, noting that the Brooklyn-born Mr. Sanders justified his vote against the 2007 measure on the Lou Dobbs program by asserting it would result in depressed wages for American workers. “Senator Sanders was on that explaining his opposition and explaining his vote and how immigrants are bad for the American economy.”

“It was language that was straight from the Republican anti-immigrant playbook,” the Council speaker continued.

Most unions and the League of United Latin American Citizens opposed the 2007 proposal—a measure Sen. Ted Kennedy spearheaded and Ms. Clinton supported—which included an expanded guest worker program that the groups asserted would lead to “exploitation.” The majority of both House Democrats and House Republicans voted in favor of the Community Protection Act.

Mr. Sanders’ campaign has been vague about his reasons for supporting the 2006 amendment, and told the Observer today that the addendum simply affirmed pre-existing law. His team accused the Clinton camp of distorting a few instances out of a long and largely pro-immigrant legislative career.

“Look at the entirety of Senator Sanders’ record, before and after the 2007 votes, and it is clear that he cares about all workers,” said spokeswoman Erika Andiola. “to try to portray him as some kind of Steve King or Donald Trump, is disingenuous beyond belief. Senator Sanders stands up for the American worker, and rejects attempts by corporations to exploit immigrant workers and pit then against the native born.”

Ms. Velazquez, who served with Mr. Sanders in the House between 1993 and 2007, argued he had shown little interest in Latino issues as a legislator.

“The question that Latinos have to ask themselves is ‘where was Senator Sanders when we needed him the most?'” she said, also attacking his votes from the last decade. “He stood with the anti-immigrant wing of the Republican Party.”

The Latina lawmakers, both natives of Puerto Rico, lauded Ms. Clinton as a consistent supporter of a liberalized immigration system and of a pathway to citizenship.

“She is not new to our community, she has a longstanding relationship that goes back more than 20 years,” Ms. Mark-Viverito said.

The congresswoman echoed that sentiment.

“I can attest that her passion runs deep when it comes to defending families and immigrants seeking a better life for themselves,” Ms. Velazquez said.

Ms. Clinton’s immigration record has a few deviations of its own. As senator from New York, she voted in favor of the 2006 Secure Fence Act, which led to the construction of 700 miles of double-layered fencing along the U.S.-Mexico border—a project both Ms. Velazquez and Mr. Sanders voted against.

But today, the congresswoman defended Ms. Clinton’s vote to the Observer.

“We always say that we wanted to make sure we had a secure border. And we invested a lot of resources in that,” she said. “We have moved, and Senator Clinton moved, to support comprehensive immigration reform.”

Ms. Mark-Viverito would not comment on the issue.

Mr. Sanders has struggled with virtually all minority groups, which have strong loyalties to Ms. Clinton, though he has performed well with younger Latinos.

The New York primary is April 19.

Updated to include comment from Ms. Andiola.