We’ve been here before.

President Barack Obama is vowing to veto the Pentagon budget bill heading to his desk, in part because it creates legal roadblocks that would prevent him from closing the detention center at Guantánamo Bay.

But the White House made similar promises to veto defense authorizations for three of the last four years, largely because of language about Guantánamo — and didn’t keep them.

The cycle dates back to 2011, when the administration opposed several provisions in the FY 2012 defense authorization that codified a process of indefinite detention and barred the use of federal money for building a detention facility in the U.S. for transfer of detainees.

A White House statement said that any bill that “challenges or constrains the president’s critical authorities to collect intelligence, incapacitate dangerous terrorists, and protect the nation would prompt the president’s senior advisers to recommend a veto.”

But Obama quietly backed down from that position when he signed the bill on New Year’s Eve of 2011. “I have signed this bill despite having serious reservations with certain provisions that regulate the detention, interrogation and prosecution of suspected terrorists,” he said in a statement.

Immediately following the bill’s passage, Human Rights Watch director Kenneth Roth said in a statement, “By signing this defense spending bill, President Obama will go down in history as the president who enshrined indefinite detention without trial in U.S. law.”

Obama likewise signed the 2013 defense bill despite Guantánamo concerns. The bill placed restrictions on transferring detainees from Guantánamo Bay to foreign countries and the U.S.

The White House had announced that advisers would recommend Obama veto the legislation because its provisions would “intrude upon the executive branch’s ability to carry out its military, national security, and foreign relations activities and to determine when and where to prosecute Guantánamo detainees.”

Human Rights Watch said in another statement following the passage of that bill that Obama’s decision to sign it “undercuts his pledge to close the prison.” Amnesty International said the bill “further entrenches indefinite detention and unfair trials at Guantánamo.”

The Obama administration criticized the 2014 defense authorization for continuing to uphold restrictive policies about detainees in Guantánamo, but its veto threats that year were tied to other elements of the legislation.

During the fight over the 2015 bill, it happened again: threats to veto the spending bill over Guantánamo never came to fruition.

The bill banned the use of funds for an additional facility for the transfer of detainees “unless it has enduring military value independent of a high-value detention mission.” It also extended the limit on transferring detainees into the United States for any reason, including for trial and medical reasons.

Jay Carney, then White House press secretary, said that Obama would veto the bill if it came to his desk in that form. In May, the White House wrote that advisers would recommend Obama veto the bill if it continued “unwarranted restrictions regarding detainees.”

But by December, when Josh Earnest took over from Carney, he simply said Obama would criticize Congress for the measure. When asked if Obama was still considering a veto, he said, “We’re going to evaluate the whole package.”

That year, both Congress and the press doubted Obama would veto the bill because of transfer restrictions. “The credibility of the White House’s threats on the issue is in doubt because past veto threats were never carried out,” wrote Politico’s Josh Gerstein.

President Obama signed the bill on December 19, 2014, continuing to criticize Guantánamo provisions: “Instead of removing unwarranted and burdensome restrictions that curtail the executive branch’s options for managing the detainee population, this bill continues them,” he said in a written statement.

Despite these and a variety of other threats, Obama has only vetoed four bills in his two terms, fewer than any president since James Garfield, who only served a few months in office before his death. However, some have suggested that Obama’s decision to veto the Keystone XL Pipeline in February will be the first of more to come during his waning presidency.

The FY 2016 defense bill would ban all transfers of Guantánamo prisoners to the United States, heighten the barrier for transfer overseas, and include prohibitions against transfers to specific countries — measures that were removed by the House and Senate in 2014 and 2015. White House senior advisers have once again said they would recommend he veto it. The White House is reportedly looking at facilities in Colorado as potential transfer locations for detainees.

Obama’s veto has been described as his “last chance” to shutter the prison. “It is essential that President Obama carry out his threat to veto the legislation,” said Virginia Sloan, president of the Constitution Project, in a press release earlier this month. “Although it is significant that large bipartisan majorities in both the House and Senate backed provisions in the legislation preventing a return to torture in future administrations — provisions that must remain in any final version of the bill — the president must insist that the transfer restrictions be removed before signing the NDAA into law.”

The bill has won approval in both the House and Senate. The House speaker is expected to sign the bill on Tuesday, according to Jon Corley, a spokesperson for the bill’s sponsor, Rep. Mac Thornberry, R-Texas, and then it will go to Obama’s desk.

Caption: A protestor demonstrates against Guantánamo Bay before Bush relinquishes office to Barack Obama. Dupont Circle, Washington D.C., January 21, 2009.