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."

Read More