President Donald Trump this afternoon signed an executive order ending family separation at the border.

The president, in an abrupt U-turn on the divisive policy put into place by his own administration, directed the Department of Homeland Security to detain families together so long as children are not put into danger.

'I didn't like the sight or the feeling of families being separated,' the president on Wednesday stated.

President Trump indicated that lobbying from his daughter Ivanka, who showed him pictures of the caged and kenneled children, and wife Melania had caused him to have a change in position.

'Ivanka feels very strongly about it. My wife feels very strongly about it. I feel very strongly about it. I think anybody with a heart would feel very strongly about it,' he said.

President Donald Trump signed an executive order ending family separation today

Both the first lady and the first daughter (pictured) were in the Oval Office on Wednesday when Trump signed the directive

President Trump indicated that lobbying from his daughter Ivanka, who showed him pictures of the caged and kenneled children, and wife Melania (Pictured in the Oval Office Tuesday) had caused him to have a change in position

Immediately after her father signed the order, Ivanka made her first public comments on the matter.

'Thank you @POTUS for taking critical action ending family separation at our border,' she said. 'Congress must now act + find a lasting solution that is consistent with our shared values; the same values that so many come here seeking as they endeavor to create a better life for their families.'

The president said Congress would have to take action - and that he still wants his border wall funded.

'And also, there may be some litigation. We’re also wanting to go through Congress. We will be going through Congress. We’re working on a much more comprehensive bill,' he said. 'And ultimately, we want to see it done right, and it will be done right.'

Of the order he'd just signed, he said, 'You're gonna have a lot of happy people.'

'People haven't dealt with it, and we are dealing with it...This is one that has gone on for many decades. So we're keeping families together, and this will solve that problem,' he stated.

'At the same time, we are keeping a very powerful border and it continues to be a zero-tolerance,' he added. 'We have zero tolerance for people that enter our country illegally.'

As Trump acknowledged, he did not end the 'zero tolerance' provision of his policy that requires the prosecution of all unlawful immigrants as criminals. His order merely authorizes DHS to hold families together while prosecution is pending.

DHS will bear the costs of constructing facilities to house migrant parents and their children while their cases are being adjudicated. The order directs the attorney general to prioritize the cases as quickly as possible.

Trump also told Attorney General Jeff Sessions to put in a request with a U.S. District Court in California to modify a settlement agreement that would permit DHS under present resource constraints to detain illegal immigrant families together 'throughout the pendency of criminal proceedings for improper entry or any removal or other immigration proceedings.'

The president tipped his hand earlier on Wednesday when he said that he would be signing something dealing with the issue as he spoke to reporters in the Cabinet room.

'I'm going to be signing an executive order in a little while before I go to Minnesota but, at the same time,' Trump said. 'I think you have to understand, we're keeping families together, but we have to keep our borders strong. We will be overrun with crime and with people that should not be in our country.'

His Department of Homeland Security secretary was said to be drafting an order to end the child separation policy that's become a political albatross for the Trump administration.

President Donald Trump first revealed his plans to sign an executive order addressing family separation during a meeting earlier today with lawmakers

The Department of Homeland Security Secretary Kirsjen Nielsen was earlier said to be drafting an order to end the child separation policy that's become a political albatross for the Trump administration

DHS Secretary Kirstjen Nielsen was at the White House on Wednesday morning and was by the president's side in the afternoon, standing opposite to the vice president, when he took the executive action.

'I just thank you for your leadership, sir. We look forward and expect the House to act this week. We ask them to do their job,' she said minutes before making a trip of her own to Capitol Hill. 'The laws need to be changed. This is a problem that President after President has dealt with for decades. This one is willing to stand up and fix it. We ask Congress to do their part.'

Ivanka and Melania Trump were also present at the afternoon signing just before he left the White House for Minnesota.

The about-face came hours after the president publicly racheted his attacks on Democrats opposing his immigration agenda via Twitter.

It also followed a press conference on Capitol Hill where House Speaker Paul Ryan at which the GOP leader refused to entertain the prospect of a stand-alone bill to handle family separation.

Ryan did not know about the executive order at the time, a person familiar with the situation told DailyMail.com, and was at the White House on Wednesday at the president's invitation to discuss immigration legislation he is about to bring up for a vote in the House.

The GOP leader was at the White House with a group of roughly 25 lawmakers who DailyMail.com's source described as on the fence.

Even with Trump's forthcoming executive order, Congress will still have to take the lead in making the policy shift permanent.

'It doesn't take away the fact that this needs to be changed into law at some point,' the person said. 'The courts could challenge what the president does in terms of executive action.'

The president's U-turn came at an immediate cost to Members of Congress, who had been looking forward to a summer picnic at the White House on Thursday.

President Trump said during a surprise media avail on Wednesday morning that he was cancelling the event.

'I do want to say that, because we're also busy....that we are going to cancel and postpone tomorrow's congressional picnic,' he stated.

Trump met yesterday on Capitol Hill with GOP lawmakers to talk about a broad range of issues. He hosted two sets of legislators at the White House on Wednesday.

Tomorrow's picnic would have offered him a chance to speak to the very same Democrats he's been clobbering for not supporting his immigration agenda.

The president who is holding a political rally tonight in Minnesota said he did not think the optics of a festive picnic with legislators and their families would be appropriate. He insinuated that he did not want to reward the opposing party that he's repeatedly called obstructionist.

'I was just walking over to the Oval Office and I said, you know, it doesn't feel right to have a picnic for Congress when we're working on doing something very important,' he stated. 'It didn't feel exactly right to me. We'll make it another time when things are going extremely well.'

Trump indicated in his Cabinet Room remarks that the images of children at the border in cages and kennels had affected him outlook.

'Those images affect everybody,' he said of the photos that have been dominating the national news since Father's Day.

The president told lawmakers, 'The dilemma is that if you're weak, if you're weak – which some people would like you to be – if you're really, really pathetically weak, the country's going to be overrun with millions of people. And if you're strong, then you "don't have any heart." That's a tough dilemma. Perhaps I'd rather be strong, but that's a tough dilemma.'

Democrats have been pummeling the Trump administration as cruel and inhumane for splitting families up at the border in order to prosecute parents for unlawfully crossing the border.

'President Trump and his enablers in Congress have taken these children hostage to try to enact their anti-immigrant agenda into law. Don’t be fooled: this crisis does not need a bill to fix it—it requires the GOP to stand up and call for an end to this monstrous Trump policy,' Sen. Dick Durbin, a Democratic leader, tweeted.

They continued their assault even after Trump signed his order, saying the administration also needed to say how it plans to reunite already-separated children from their families.

'Today the American people, through their forceful and justified outrage, proved they can drive change even during the Trump administration. But we must not be fooled: We need to ensure that the 2,500 children already separated are promptly reunited with their families,' Sen. Patrick Leahy tweeted.

Rep. Robin Kelly similarly said, 'We can’t let @realDonaldTrump off the hook just for ending his cruel and immoral program. There are still NO plans to reunite 2,300+ children with their families.'

Democratic Congressman Keith Ellison said the directive that Trump did sign 'doesn't fix this mess. '

'We shouldn't be putting kids in cages, with or without their families. And Nielsen must go,' the former DNC official said, calling for the ousting of the DHS secretary.

The order had Rep. Ed Perlmutter and others claiming that it proved Trump 'had the authority to stop these inhumane practices all along' despite what his administration said.

'For weeks @realDonaldTrump claimed only Congress could end this merciless policy. Today’s executive order is an admission both that he lied to America & his attempt to hold children hostage has failed because of Americans’ outrage,' said House Democratic Whip Steny Hoyer.

Leahy noted that Trump's order explicitly does not end the zero tolerance policy for illegal border crossings.

'Pres. Trump’s “zero tolerance” policy needs to go. It makes zero sense to delay civil proceedings to criminally prosecute migrants with no records, who pose no threat, and who are only seeking refuge from unimaginable violence and terror in their home countries,' Leahy said.

At his executive order signing, President Trump said he is not backing down and rejected suggestions to the contrary.

'No, no, the border is just as tough, but we do want to keep families together. This is a problem. If you look at some of those horrible scenes from a few years ago — to me, they were horrible scenes. They were just terrible. And that was during the Obama administration,' he said. 'Other administrations have had the same thing. We’re keeping the family together. And so this is it.'

DHS Secretary Kirstjen Nielsen went to Capitol Hill to talk to lawmakers after President Trump signed the executive order that needs to be back up by congressional action

President Trump said Wednesday that he wants 'security for our country, and we will have that.'

'At the same time we have compassion, we want to keep families together. It's very important,' he stated. 'I'll be signing something in a little while that's going to do that.'

He noted that Republicans are also working on legislation that meet the same end.

'But I'll be doing something that's somewhat preemptive but ultimately will be matched by legislation I'm sure.'

His exercise of executive power also flew in the face of Republican complaints about immigration directives put in place by the previous administration - and his own claims last week that he couldn't end family separation.

'You can’t do it through an executive order,' he told reporters a week ago on Friday.

Trump made reference to Obama's alleged abuse of power today when he brought up Deferred Action for Childhood Arrivals program, claiming that Obama acknowledged he shouldn't be signing the order and did anyway.

'He actually said, I’m not allowed to sign this, never going to hold up,' Trump said of the program and ongoing litigation. 'And they got a judge who held it up, and they got another one who held it up. Then we had a couple that turned it down, and it’s going to be a Supreme Court issue.'

The Republican president found himself in a similar bind this week as the opposing party stymied his immigration reform agenda.

'We're having a lot of problems with Democrats that don't want to vote for anything,' he said. 'They don't care about lack of security. They really would like to have open borders where anybody in the world can just flow in, including from the Middle East, from anybody anywhere they can just flow into our country.

'Tremendous problems with that, tremendous crime caused by that. We're just not going to do it.'

Trump said in a tweet this morning that Democrats 'want open borders which means crime' as he saddled them with the burden of changing America's immigration laws, which he said are the 'weakest and worst anywhere in the world.'

He said in another vague message, whoever, that he is 'working on something' pertaining to immigration without saying what it is.

Immigration reform legislation in Congress was no closer on Wednesday to gaining majority support in the House, even after a closed-door session between Republicans and the president, meetings at the White House and a visit to Capitol Hill by Nielsen.

GOP leaders were looking at two pieces of legislation that would fund the president's border wall, one of which also takes steps to end family separation for Central American migrants.

Conservative lawmakers were also crafting a 'back-up' bill that they hoped to sub in if the other two fail. Their bill sets aside most of Trump's other immigration priorities and deals solely with the detention of children coming across the border in family units.

Trump said in a speech Tuesday that he supports a 'third option' and even claimed credit for it.

Ryan said at a morning news conference that he was moving forward with the leadership-approved immigration reform bills that were scheduled for a vote tomorrow.

The GOP leader refused to entertain questions about stand-alone bills that narrowly deal with the issue of young children being detained in cages and tents while their parents await prosecution for the crime of unlawfully entering the country.

'We're trying to pass this legislation right now. This is very good compromise legislation,' Ryan told reporters.

It solves the border crisis, he claimed, and stabilizes the Deferred Action for Childhood Arrivals program, better known as DACA.

'And then when other situations arise, whatever the circumstances are, we'll cross this bridge when it comes to it,' he asserted.

Ryan rejected Democrats' allegations that the GOP is using the immigrant children as bargaining chips to get more of the president's immigration priorities passed.

'That's a ridiculous assertion,' Ryan said as he stormed out, having already deemed it the last question.

Immigration reform legislation was no closer on Wednesday to gaining majority support in the House, however, even after a closed-door session between Republicans and the president

In morning tweets in which Trump insisted that Democrats are to blame for family separation because they will not bend to his will, he alluded to the measure again as he said he was 'working on something' that he suggested would change the conversation.

'It’s the Democrats fault, they won’t give us the votes needed to pass good immigration legislation,' he said. 'They want open borders, which breeds horrible crime. Republicans want security. But I am working on something - it never ends!'

Coming out of the meeting with GOP lawmakers, the White House said that Trump was '100 percent' behind the two bills House leadership plans to bring up for a vote.

Trump reportedly did not talk to lawmakers at all about family separation.

Democrats have pummeled the GOP for coupling family separation - a policy introduced in April by the Trump administration - with comprehensive immigration reform.

Sen. Chris Van Hollen, head of the Democratic Senatorial Campaign Committee, said in a Tuesday email to members, 'There is no universe in which forcibly separating now thousands of young children from their parents is acceptable. The practice is an abomination. It’s not part of any solution to fix our immigration system.'

Van Hollen said he spent his Father’s Day visiting immigrant detention centers on the border and 'there is no doubt that the Trump administration’s family separation policy is cruel and inhumane.'

'In McAllen, Texas, I saw a facility people called “the dog kennel” which housed children separated from their mothers and fathers lumped into holding pens made of chain-link fence. It was a disturbing and shameful scene that should have no place in America,' the Maryland Democrat wrote.

House Minority Leader Nancy Pelosi similarly wrote in an email on behalf of the lower chamber's campaign arm: 'I have never been more horrified by this President. His choice to separate immigrant children from their mothers at our border is heartless. It’s cruel. It’s immoral. And -- it’s all for political leverage.'

House Homeland Security Chairman Mike McCaul, a Texas Republican, admitted to Fox News on Tuesday after the meeting with the president that family separation was a policy of this president.

'The parents are now being prosecuted but we would like to see the family stay together and not separated,'he said. 'But I think most importantly from my position as the chairman of homeland security is to have a border security bill passed.'

Unless Congress acts, he said, smugglers and traffickers will continue to sell entry to the United States for for $6,000 a person.

'We will never stop this problem until we dry up the deterrent issue and the legal loopholes that existed currently,' he stated.

Even some staunch allies of the president said they couldn't get behind him when it comes to the detention of families, though. His former lawyer on Wednesday quit the national party as deputy finance chair, citing the president's border policy and the special counsel investigation.

'As the son of a Polish holocaust survivor, the images and sounds of this family separation policy is heart wrenching,' Cohen said in a resignation letter according to ABC News. 'While I strongly support measures that will secure our porous borders, children should never be used as bargaining chips.'

First Lady Melania Trump was also said to be lobbying her husband to take action.

She has pressed him privately, CNN reported, as well as publicly to address family separation.

'Mrs. Trump hates to see children separated from their families and hopes both sides of the aisle can finally come together to achieve successful immigration reform,' her communications director, Stephanie Grisham, said. 'She believes we need to be a country that follows all laws, but also a country that governs with heart.

President Trump suggested Tuesday that he could cut down on unlawful migration by ending aid to the Central American countries that he claimed are 'sending'migrants to the U.S. as part of his plot to secure the border.

Trump said he'd be asking for authorization to end assistance to the region that includes Guatemala, El Salvador and Honduras.

'We're not going to give any more aid to those countries,' he asserted during a Washington, D.C. speech to the National Federation of Independent Business. 'Why the hell should we?'

The president told attendees of the conference, 'I don't want children taken away from parents. And when you prosecute the parents for coming in illegally, which should happen, you have to take the children away.'

'Now, we don't have to prosecute them. But then we're not prosecuting them for coming in illegally. That's not good,' he added.

The president said then that he'd be championing legislation to make sure that families that are flooding the border from Central America are not being separated as he lit into lawyers for migrants and judges he claimed are abusing the system.

'We want a great country. We want a country with heart,' Trump said. 'But when people come up, they have to know they're not going to get in. Otherwise it will never stop.'

Vice President Mike Pence was coincidentally meeting at the White House on Wednesday afternoon with the Honduran president.

A White House official suggested to DailyMail.com just before the meeting that Trump was just saber-rattling and had not actually requested that the aid be cut off.

The official said, 'No decisions have been made on that at this time.'

The president has repeatedly said that doesn't like that children are being separated from their legal guardians- even though it's a policy that was implemented by his administration.

'We can't let people pour in. They've gotta go through the process,' he stated Tuesday. 'And maybe it's politically correct or maybe it's not - we've gotta stop separation of the families.'

Standing his ground then, Trump said, 'But politically correct or not, we have to be a country that needs security, that needs safety, that has to be protected.'

'And remember, these countries that we give tremendous foreign aid to in many cases, they send these people up, and they're not sending their finest.'

The president rejected Democratic demands that the country hire more judges to adjudicate the cases of legitimate asylum seekers faster as part of the solution.

'I don't want to try people. I don't want people coming in,' he asserted.

Trump said the ease of entry has led to a 1,700 percent increase in asylum claims.

'They game the system. They game it. It's so easy for them. They're smart. They didn't go to the Wharton School of Finance,' he said, name-checking his alma mater, 'but you know what. They're really smart.'

Trump pounded Democrats for refusing to back his immigration agenda, which he said earlier in the day was allowing violent criminals 'to pour into and infest our Country, like MS-13,' a violent illegal immigrant gang.

'They don't want to give it, because Democrats love open borders. Let the whole world come in. Let the whole world. MS-13 gang members from all over the place, come on in -- we have open borders,' he said.

'And they view that possibly intelligently, except that it's destroying our country. They view that as potential voters. Someday they're going to vote for Democrats. Because they can't win on their policies, which are horrible. They found that out in the last presidential election.'

Immigrant children are led by staff in single file between tents at a detention facility next to the Mexican border in Tornillo, Texas

A view from Mexico of the US Customs and Boarder Protection is housing underage people caught illegally entering the United States at the Tornillo Port of Entry in Guadalupe Bravos

US Border Patrol agents patrol the bed of the Rio Grand in front of where the US Customs and Boarder Protection is housing underage people

Locals walk along the Mexico side of the U.S.-Mexico border in Tijuana

A remark on Tuesday about crime-committing illegals that 'infest' the U.S. immediately stoked controversy, with the president's detractors saying the blanket description was not only wrong but inhumane.

Another incident earlier this year caused outrage when the president called gangster immigrants 'animals' in another statement his critics cast as incendiary.

The White House has spent the past week fighting with Democrats accusing theTrump administration of exploiting migrant families instead of taking an expected post-Singapore Kim summit victory lap.

Each side has condemned the other for using children as 'pawns' in a raging illegal immigration debate.

A view of inside U.S. Customs and Border Protection (CBP) detention facility shows detainees inside fenced areas at Rio Grande Valley Centralized Processing Center in Rio Grande City, Texas, U.S., June 17, 2018. Picture taken on June 17, 2018

Nielsen said Monday in remarks that were criticized as tone deaf that Democrats bludgeoning the administration for its 'zero tolerance' policy at the border are acting 'cowardly' and could change federal immigration law if they wanted to.

She stood at the White House podium and argued that DHS was just doing its job in enforcing a Trump administration policy that has led more than 2,000 children to be separated from their parents or guardians in the last six weeks.

'If an American were to commit a crime anywhere in the United States,' she told a room full of reporters, 'they would go to jail and they would be separated from their family.'

Nielsen said, 'This is not a controversial idea.'

When asked by reporters if the policy amounts to 'child abuse', Nielsen, who is now under pressure to resign, denied the accusation.

'We have high standards. We give them meals and we give them education and we give them medical care. There are videos, there are TVs. I visited the detention centers myself.'