WASHINGTON -- Under increasing political pressure, President Trump signed an executive order Wednesday that temporarily prevents the separation of families prosecuted for illegally crossing the border.

"We're going to keep the families together," he added. "I didn't like the sight or the feeling of families being separated. At the same time, we are keeping a very powerful border and it continues to be a zero tolerance. We have zero tolerance for people that enter our country illegally.

The president said first lady Melania and daughter Ivanka lobbied for the reversal of his immigration policy.

"Ivanka feels very strongly. My wife feels very strongly about it. I feel strongly about it," Mr. Trump said. "I think anybody with a heart would feel strongly about it."

The president's "zero tolerance" immigration policy announced in May mandated universal prosecution of adults who enter the country illegally. Under longstanding law, children cannot remain with adults being detained on criminal charges.

In the face of bipartisan blowback, administration officials said their hands were tied.

"Congress and the courts created this problem, and Congress alone can fix it," Department of Homeland Security Secretary Kirstjen Nielsen said earlier this week.

"If we pass legislation to end the lawlessness, we won't face these terrible choices," Attorney General Jeff Sessions said while Mr. Trump added, "the Democrats have to change their law -- it's their law."

Wednesday's executive order is not a permanent solution. It allows families to be held together for 20 days. After that, they must either be deported or separated. The Trump administration says that means Congress still has to act.

"We are going to see what happens," Mr. Trump said.

The administration says children who have already been separated from their guardians will not be immediately reunited with their families.

The president's executive order came amid pressure from normally supportive coalitions. A radio spot from the Christian conservative group Colson Center aired on 600 stations around the country.

"Families should not be separated," the radio ad says. "Parents shouldn't break the law with their children. And children shouldn't be punished for their parents breaking the law."

In a statement Wednesday night, the Department of Homeland Security press secretary Tyler Q. Houlton said that Mr. Trump's executive order "helps us to prevent the separation of illegal alien families while encouraging Congress to find a much needed long-term solution to close loopholes n our immigration system that have resulted in catch and release."

Houlton added: "the Department of Homeland Security will do what is possible to hold illegal border crossers accountable while also holding families together as long as the law allows."