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.
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 presidenttweeted "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."
"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.