Senate Majority Leader Mitch McConnell spoke with Trump twice Thursday — and Trump made the decision late Thursday that he wanted the shutdown to end, according to a source familiar with the conversations.

The first call came after a contentious Senate GOP lunch, in which, Republican senators vented frustration at Vice President Mike Pence about the lack of strategy to get out of the shutdown. McConnell told Trump that it was unclear how much longer he could get GOP senators to hold the line — especially if there were another round of votes to end the shutdown.

A few hours later, Trump called McConnell back with a new perspective. Trump made clear he wanted the shutdown to end, which led to the deal that was approved by Congress on Friday.