WASHINGTON — President Obama on Wednesday signed a defense bill into law despite provisions that will continue to impede his goal of closing the wartime prison at Guantánamo Bay, Cuba. But he again suggested that he thought those provisions might be unconstitutional and not necessarily binding.

“The continued operation of this facility weakens our national security by draining resources, damaging our relationships with key allies and partners, and emboldening violent extremists,” he wrote in a “signing statement” attached to the defense policy bill. “It is imperative that we take responsible steps to reduce the population at this facility to the greatest extent possible and close the facility.”