HONOLULU -  US President Barack Obama on Friday signed into law an annual defence policy bill, but in a lengthy statement he raised objections to parts of it, including policies blocking him from closing the detention centre at Guantanamo Bay, Cuba.

Obama pledged in his 2008 presidential campaign to close the military prison, but his efforts have been blocked by mostly Republican opposition in Congress. The Democratic president has instead reduced the population there by transferring prisoners to other countries.

The administration recently told Congress it would move up to 18 more prisoners of the 59 remaining at Guantanamo before Obama leaves office next month.

"During my administration, we have responsibly transferred over 175 detainees from Guantanamo," Obama said in the statement on Friday. "Our efforts to transfer additional detainees will continue until the last day I am in office."

President-elect Donald Trump, who will be sworn in on Jan 20, said during the campaign that he would keep the Guantanamo Bay facility open and vowed to "load it up with some bad dudes".

The $618.7 billion defence spending bill passed by the Republican-controlled Congress this month was a compromise version that dropped controversial language requiring women to register for the draft.

But it kept some Republican-backed initiatives Obama had opposed. The legislation boosts military spending when there has been no similar increase in non-defence funding, and it bars closures of military bases even though top Pentagon officials say they have too much capacity.

House of Representatives Speaker Paul Ryan, a Republican, said on Friday the legislation would give US troops a pay raise and praised the Guantanamo language. "This ensures that, right up until his last hour in office, President Obama will not be able to transfer Guantanamo Bay detainees to the United States," Ryan said in a statement.

OBAMA CONDITIONS HALF OF FUNDING TO PAKISTAN

INP adds: The defence budget calls for enhancing security cooperation with India and conditions nearly half of the funding to Pakistan on a certification that it is taking demonstrable steps against the Haqqani Network.

Obama asked defence secretary and secretary of state to take steps necessary to recognise India as America’s “major defence partner”.

The bill imposes four conditions on Pakistan to be eligible for $400 million of the $900 million of the CSF.

The US defence secretary needs to certify to the Congress that Pakistan continues to conduct military operations that are contributing to significantly disrupting the safe haven and freedom of movement of the Haqqani Network in Pakistan and that Islamabad has taken steps to demonstrate its commitment to prevent the Haqqani Network from using any of its territory as a safe haven.