HONOLULU (AP) — President Barack Obama signed into law Friday a defense policy bill that authorizes $611 billion for the military in 2017, lauding provisions designed to sustain momentum in countering the Islamic State group while harshly criticizing Congress’s insistence on keeping open the military prison at Guantanamo Bay, Cuba.

The legislation provides a 2.1 percent pay hike for the military and sets spending priorities and guidance for the current fiscal year. The funding for the programs is delivered through a separate spending bill.

Obama, who is vacationing in Hawaii, said the bill will provide vital benefits to military personnel and their families. He also said it improved flexibility for government agencies in countering cyber-attacks and adversaries’ use of drones.

ADVERTISEMENT

But he was highly critical of several other provisions. Among them, Obama cited the continued operation of Guantanamo. He said spending hundreds of millions of dollars to keep fewer than 60 men in isolation undermines U.S. standing in the world and emboldens violent extremists.

Obama submitted a plan in February to close the detention facility. Instead, lawmakers are trying to keep the facility a permanent feature in the war on terrorism, the president said.

ADVERTISEMENT

Over the last two years, the administration has transferred 73 detainees to other countries, and Obama said in a release that the efforts to transfer others will continue until his final day in office.

“Unless the Congress changes course, it will be judged harshly by history,” Obama said.

Obama also said Congress failed to use the bill to reduce wasteful overhead or modernize military health care, which he said would exacerbate budget pressures facing the military in the years ahead.