U.S. Democratic presidential candidate Sen. Bernie Sanders, D-Vt., has a mixed history on voting for gun legislation. Above, he attends a campaign rally in Manchester, New Hampshire, Jan. 4, 2016. Reuters/Gretchen Ertl

If Vermont Sen. Bernie Sanders becomes the Democratic nominee in 2016, he might have trouble winning support from President Barack Obama. Based on the terms the president laid out in a op-ed on gun control published Thursday night, Sanders’ record on gun control could land him in the category of people for whom Obama would not campaign.

“I will not campaign for, vote for or support any candidate, even in my own party, who does not support commonsense gun reform,” Obama wrote in the op-ed, which was published in the New York Times. The president outlined some specific areas he sees as in need of such gun reform. He argued, as he did during a town hall on guns Thursday night, that the gun lobby has controlled Congress and led lawmakers to leave the gun industry “almost entirely unaccountable.”

Obama said this accountability stems from actions such as Congress blocking requirements that firearms have safety features, making it difficult to conduct research on gun violence research and protecting gun manufacturers from liability for gun injuries. On this last point, the president used particularly strong language, saying that Congress has “guaranteed that manufacturers enjoy virtual immunity from lawsuits, which means that they can sell lethal products and rarely face consequences.”

Sanders voted for that piece of legislation when he was in the House of Representatives in 2005, Politico reported. While Sanders has spoken out on the campaign trail about the need for gun reform, he has stood by this position and other previous gun votes while running for president.

“The issues that you're talking about is, if somebody has a gun and it falls into the hands of a murderer, and that murderer kills somebody with the gun, do you hold the gun manufacturer responsible?” Sanders said on CNN in July. “Not any more than you would hold a hammer company responsible if somebody beat somebody over the head with a hammer.”

Bernie Sanders on Gun Rights | InsideGov

The issue of Sanders’ gun record has come up throughout the campaign — perhaps most notably during the first Democratic primary debate in October when his opponents and CNN moderator Anderson Cooper pressed him on the issue. Cooper reminded the audience of Sanders’ positions on gun control, explaining that Sanders voted against the Brady Bill, which mandated background checks and a waiting period before buying a firearm, he supported allowing passengers to bring guns in their bags on Amtrak trains, and he voted to give gun manufacturers immunity in state and federal courts.

Sanders attributed his record to serving office in the rural state of Vermont, where people like guns, and said he voted for the 2005 gun manufacturer bill because there were other parts of the legislation he liked. But some deemed his answer weak, and when former Secretary of State Hillary Clinton was asked if she thought Sanders was tough enough on guns, she responded: “No, not at all.”

Clinton and the other Democratic presidential candidate, former Maryland Gov. Martin O’Malley, have typically spoken in stronger terms about gun control throughout the campaign. O’Malley in particular has lashed out at the other two Democrats in an attempt to showcase his particularly strong support for gun control.

Obama announced a series of executive actions on gun control this week and has been focused on getting out his message around those measures. He has not clarified which lawmakers his op-ed might apply to in terms of support. Sanders said he supported the president’s executive actions and would keep them if he were elected in 2016.

“It's become clear that no mass shooting, no matter how big or bloody, will inspire Republicans to put children and innocent Americans over the interests of the NRA. They are simply more loyal to gun lobbyists than our children,” Sanders said in a statement. “A vast majority of the American people, including responsible gun owners who are sickened by the deaths of so many innocent people, agree with the commonsense reforms announced today.”