Story highlights

Bernie Sanders criticized a 2007 vote Hillary Clinton cast on the detention center at Guantanamo Bay

But Sanders cast a similar vote two years later, blocking President Barack Obama's move to close the facility

Obama delivered his blueprint Tuesday for the controversial military prison's closure.

Washington CNN  — 

Bernie Sanders attacked Hillary Clinton’s record on the detention center at Guantanamo Bay on Tuesday, just after President Barack Obama delivered his blueprint for the controversial military prison’s closure.

But Sanders himself has voted against shuttering the U.S. military facility in Cuba.

And unlike Clinton, he has not signed on as a cosponsor to legislation that would have led to the closure of the facility, otherwise known as Gitmo.

The U.S. military prison has long been a hot-button political subject, and prominently surfaced in the 2008 election, when Obama promised to shut it down. Obama’s latest move to close it triggered quick backlash from Republican presidential contenders, making it a central focus on the 2016 campaign trail as well.

“Keeping this facility open is contrary to our values,” Obama said Tuesday in short remarks at the White House. “It undermines our standing in the world. It is viewed as a stain on our broader record of upholding the highest standards of rule of law.”

Both Democratic candidates have agreed with Obama’s stance on the military prison in recent years.

But Sanders took a shot at Clinton on Tuesday as he praised Obama’s latest move.

“I am encouraged to see that the President is sending Congress a plan to shut down the Guantanamo Bay prison. As I have said for years, the prison at Guantanamo must be closed as quickly as possible,” Sanders said in a statement, noting that he visited the prison during a 2014 trip to Cuba.

He then took a shot at Clinton, saying, “Others, including my opponent, have not always agreed with me.”

Both Sanders and Clinton have raised questions about just what happens to the detainees held there in the past, their Senate records show.

In a news release Tuesday morning, the Sanders campaign said, “Sanders was one of only three senators to vote in 2007 against barring the transfer of Guantanamo detainees to America. Then-Sen. Hillary Clinton voted for the amendment that kept the prison open.”

That appears to be a reference to a 2007 non-binding “sense of the Senate” measure stating that Guantanamo Bay detainees “should not be released into American society, nor should they be transferred stateside into facilities in American communities and neighborhoods.”

Also opposing that measure was Sen. Dianne Feinstein, D-California, who that year authored legislation that would have closed the Guantanamo Bay facility and directed detainees there to be transferred to a U.S. detention facility, to an international tribunal or to another country for legal proceedings there.

Clinton co-sponsored that legislation – Sanders did not.

Two years later, in 2009, with Clinton serving as Obama’s secretary of state, Sanders broke with his fellow Vermont senator Patrick Leahy, a Democrat, on another Guantanamo Bay-related measure.

That vote, like the one Sanders criticized Clinton for casting, was overwhelming – a 90-to-6 vote to block Obama’s request for funds to shutter the facility in Cuba until the President laid out plans for what to do with the then-240 detainees there.

Sanders was among the 90 opponents of Obama on that measure; Leahy was among the six supporters.

Sanders’ spokesman did not respond to CNN’s requests for an explanation of his campaign’s criticism of Clinton, or of that 2009 vote. Clinton has not attacked Sanders’ record on Guantanamo Bay.

Clinton, before departing the State Department, had urged Obama to close the facility.

“I remain a strong advocate of your policy to close the Guantanamo Bay detention facility (GTMO) responsibly and to ensure U.S. detention policy and practice for terrorism suspects are consistent with U.S. values and do not strengthen our enemies,” Clinton wrote in the memo.