United States President, Donald Trump on Wednesday signed an executive order ending his policy of taking migrant children away from their parents at the border.

The president’s change of heart is coming after weeks of his insistence that the US could not prevent the separation of children and their parents through an executive order.

Trump had maintained that the order, which would expand the time that minors could be held in custody and which would allow families to remain together could only be ended by the nation’s Congress.

While signing the order, Trump acknowledged that the images of detained children had made it difficult for him to maintain his policy in the face of mounting international criticism.

“We want security for our country. The Republicans want security, and insist on security for our country, and we will have that and keep families together. It’s very important. I’ll be signing something in a little while that’s going to do that.

“Those images affect everybody. But I have to say, you have double standards. You have people that want absolute security and safety, and you have people that do look at the children and then you have people like me, and I think most of the people in this room, that want both,” he said.