Bernie Sanders’ pro-gun-rights voting record could burn him in New York City, which has among the strictest gun-control laws in the nation, political analysts say.

In 2009, Sanders voted in the Senate for a measure to permit Amtrak passengers to transport firearms and ammunition in their checked baggage. Guns had previously been banned from Amtrak. The measure, opposed by New York Sens. Charles Schumer and Kirsten Gillibrand, passed and was signed into law by President Obama.

“[Sanders’] view on guns is out of the mainstream for many traditional New York voters who may vote in the April 19 primary,” said Democratic consultant Hank Sheinkopf.

Sanders campaign policy director Warren Gunnels defended the vote: “This bill was signed into law by President Obama and had the support of 27 Democrats. These are the same rights that airline passengers currently have.”