President Obama has ignored calls by Donald Trump to halt the transfer of the 59 remaining prisoners from Guantanamo Bay and plans to release a third of them before he leaves office.

The White House aims to free up to 19 detainees by January 20 – four were transferred to the Saudi Arabian authorities this week. The detention centre on Cuba held 242 people when Mr Obama took office in 2009.

The prisoners who will remain face military charges or are deemed too dangerous to transfer. The White House did not disclose the identities of the four prisoners transferred to Riyadh. “We do not comment on the progress of individual detainee transfers until they are completed,” a spokesman said.

Mr Obama campaigned in 2008 on a promise to close the prison, which is located on a US naval base in southeastern Cuba, and which he called a recruiting tool for extremists. It has been controversial since it was opened in 2002 by President Bush Jr because of its extrajudicial practices and alleged use of torture.

Mr Trump has vowed to keep the prison open and “load it up with some bad dudes”. He tweeted on Tuesday: “There should be no further releases from Gitmo. These are extremely dangerous people and should not be allowed back on to the battlefield.”

Besides Saudi Arabia, at least three countries – Oman, the United Arab Emirates and Italy – will accept transferred detainees who have been deemed safe for repatriation.

The Office of the Director of National Intelligence reported in September that 122 of the 693 inmates who had been released from the prison since it opened subsequently became terrorists. A dozen prisoners who were released by Mr Bush went on to kill Americans in Afghanistan.

One prisoner, Ghassan Abdullah al Sharbi, testified before a prison review board that Saudi Arabia was secretly encouraging detainees released into its authority to return to extremism. The country has taken in more than 130 former Guantanamo inmates.

Mr Obama has been unable to transfer inmates to the US because of objections from fellow politicians.

Mr Trump has not specified how he will maintain Guantanamo Bay. John Kelly and Mike Pompeo, his choices to lead the department of homeland security and the CIA respectively, have said that they support keeping the prison open.