Theresa May has rejected a call from Donald Trump for the UK to take back British extremists who have fought with Islamic State.

The US President said European countries including the UK should repatriate more than 800 captured IS fighters and put them on trial.

Downing Street said prosecutions should usually take place in the country where the crimes were committed.

Mr Trump used Twitter posts to call for the UK, France and Germany to take back captured fighters from IS – also known as ISIS – and warned if they did not the US would be forced to release them.

“The US does not want to watch as these ISIS fighters permeate Europe, which is where they are expected to go,” Mr Trump said.

“We do so much, and spend so much – Time for others to step up and do the job that they are so capable of doing.”

Mrs May’s official spokesman said: “Foreign fighters should be brought to justice in accordance with due legal process in the most appropriate jurisdiction.

“Where possible, this should be in the region where the crimes had been committed.

“We continue to work closely with our international partners on this. The Government will do all it can to ensure the safety and security of the UK.”

The comments from Mr Trump come after ministerial differences of opinion relating to the repatriation of foreign fighters and their relations to the UK – provoked by the case of 19-year-old Shamima Begum.

Ms Begum, who has confirmed she has given birth to a boy, ran away to IS-controlled Syria but now wants to return to the UK to bring up her baby.

Home Secretary Sajid Javid has warned he “will not hesitate” to prevent the return of Britons who travelled to join IS but Justice Secretary David Gauke told Sky News “we can’t make people stateless”.