ABC News April 8, 2019

Trump ordered part of border closed, his administration pushed back: Sources

WATCH: Trump cleans house at Department of Homeland Security

President Donald Trump came far closer to closing the border than previously understood, ordering his top aides nearly two weeks ago to shut down a portion of the border with Mexico within 24 hours, ABC News has learned from two sources familiar with the matter.

The order came during a tense Oval Office meeting on March 28, just one day before the president publicly threatened to close the border the following week.

The president grew frustrated during the meeting, which ended with an order for the Secretary of Homeland Security Kirstjen Nielsen and Secretary of State Mike Pompeo to shut down a portion of the border the next day, with plans to possibly expand the closures, according to the sources.

(MORE: Trump to visit replacement wall in California, insists he 'never changed' his mind on closing down U.S.-Mexico border)
Etienne Laurent/EPA via Shutterstock, FILE
S President Donald J. Trump gestures to the crowd after he delivered a speech during a Republican Jewish Coalition meeting in Las Vegas, Nevada, USA, 06 April 2019.

Trump attends Republican Jewish Coalition in Las Vegas, USA - 06 Apr 2019

The president's order sent White House aides scrambling to convince him not to close it, and that day they were able to convince him to keep the border open for a week so that the administration could craft an emergency plan.

The aides were successful. By Friday the president tweeted "If Mexico doesn't immediately stop ALL illegal immigration coming into the United State through our Southern Border, I will be CLOSING the Border, or large sections of the Border, next week."

(MORE: Trump threatens to completely close southern border as early as next week if Mexico doesn't stop 'illegal immigration')

"The president was literally hours away from sealing the border last week. Hours. But he was persuaded to delay, which gave enough time to consider alternatives," a senior administration official familiar with the matter told ABC News. "It also allowed Pompeo and Nielsen to ratchet up the pressure on Mexico, which started taking tougher action, though they didn't publicize it."

The incident -- while the threat was never carried out -- demonstrates a penchant for making snap policy decisions that are a times at odds with the thinking of a majority of the administration.