Now he sat in his Capitol Hill office Wednesday evening with an agreement officially in hand, it was up to Shelby to shorten President Donald Trump. First, "We needed a liquid," Shelby later told a chuckle. "We didn't have much, but we tried to get some."
But when he went through important parts of the deal, veteran Alabama senator couldn't ask himself what a question everyone in Washington wanted to answer: Would Trump write it? "I didn't know what to ask him," Shelby said. "You know you don't want to ask questions that are open."
The next day, Shelby's reluctance to get a firm answer from Trump revealed to leave Republicans in limbo. Since the full details of the 1,169-page package went public, the word from the White House began that Trump considered a veto. Some of his advisers, adjuncts said, urged him to reject the deal and instead of a stop-gap action – something most Senate Republicans deeply opposed.
For hours, the Republican conference was on sticks and needles worried that the whole effort to avoid a second government stop would fall apart at the last minute. And if the vote was right, the GOP was responsible for taking most of the debt, not the Democrats.
Then at 3 o'clock Trump called Shelby. "I said," Mr President. "And he said," I'm on board. ""
About 30 minutes later, the Senate began voting on the bill and passing it on to any passage in the Chamber and ending nine of the most rude weeks of Washington's paralysis in modern history . The story of how it ended is not one of the highest ranking officials in the White House coming to Hill and settling a big deal, as Vice President Mike Pence and Jared Kushner, the president's son-in-law and senior advisor, had tried. Neither is one of the party's two leaders, Nancy Pelosi and Mitch McConnell negotiating their heads.
Instead, the crisis resolved how spending should be: with the highest funding working behind the scenes to the hammer out a deal. The credits, according to aides and lawmakers in both parties, belong to four veteran legislators, two democrats and two Republicans, two men and two women, all of whom are well over 70 years old and who together have more than 130 years of experience in the congress.
Shelby, Sen. Patrick Leahy from Vermont, New York Rep. Nita Lowey and Texas Rep. Kay Granger is the top four grants in Congress. The youngest among them, Granger, is 76; The oldest, Shelby, is 84. When creating an agreement that seemed impossible for weeks, the four legislators could avoid a second suspension and prove that Congress, albeit only the shortest possible, can still work.
Senate Republicans were appalled at meeting rooms with closed doors. Their agenda was stopped. There was no strategy from the White House, they complained. The president's relentless, obsessive push for $ 5.7 billion in a congress with a chamber ruled by Democrats was, according to a GOP senator's words, "misleading."
"We want to support him. We want our back. But he can't just turn around and hang us out to dry," the senator, who refused to go on the record for fear of getting back the battle from Trump, told CNN.
Across the Capitol, the new Democratic majority in House had its own agenda, which for some of the newest members of the caucus included blocking Trump at every turn. Some news democrats were one dollar with funding for Trump's border road too much.
The party leaders were also not very helpful. Trump and House Speaker Nancy Pelosi were barely on speaking terms, while Senate leader Mitch McConnell had reached a point "beyond frustration", according to a person who spoke to him regularly. The suspension debate had blocked its relentless pressure to move through nominations – especially legal nominations – and did not create a lack of heartburn within his conference.
"We pray for you."
 Early on, it became clear that the only way that an agreement could be hit was to leave the negotiations up to the four veteran grants and give them room to work. McConnell, in conversation with Trump, urged him not to disturb, according to two people who knew the discussions. Meanwhile, Pelosi stayed in regular contact with Lowey, but had no hurry to put his thumb on the scale.
"We pray for you," McConnell Shelby told a closed meeting with the Senate Republican committee chairs when the negotiators began their work at the end of January, according to a meeting participant. The note, said the participant, "arose only partially in the crook."
The four negotiators made rapid progress, from opening bids that were not beginners to closing a series of questions to getting the bill within the possible reach a week before a shutdown "It helped Shelby and Leahy be friends. The two sometimes travel with their wives and built one of Hill's most productive working conditions. Last year, they hired more grants in one year than any Republican-democratic duo under the last three decades
Lowey and Granger are also close and, according to assistants, mutual respect and trust in each other. Lucille Roybal-Allard, a conference committee member and senior home insurance negotiator for house democrats, joined the quartet and played a key role in grinding through the early questions, said a democratic aide.
On Friday, February 8, one week before the suspension deadline, the group seemed to be within a distance from an agreement. Then everything fell apart.
Storage beds and poison pills
Capen had been in the original democratic proposal, but Republican negotiators did not believe the Democrats were serious about it and largely ignored the idea.
On Saturday morning, just six days from the closing date, democratic co-workers revealed that they were serious about imprisoning beds and denying themselves. GOP employees were stunned. Shelby told his staff to go, as they did during a curt, 10-minute meeting between Republican and Democratic staff in the Capitol that afternoon.
Lowey called Shelby later in the day and urged him to come back to the table. The detention bed reduction was a non-starter, Shelby told her. Lowey then called Leahy and asked him to reach out to his friend, which he did not use. Shelby's position was fixed.
He sent the message publicly the next day at Fox News Sunday. "I think talking is stalled right now," Shelby told anchor Chris Wallace. "We have some problems with the Democrats working with ICE, there are detention criminals coming into the US and they want a cap on them. We don't want a cap on it."
On Monday morning, Feb. 11, McConnell was on the Senate floor and called the Democratic Proposal a "poison pill". Staff in both parties began working on backup options to keep the government open. Early in the afternoon, after a weekend of conversation between democratic conferees and leaders, Pelosi called Roybal-Allard and Lowey from the west coast, where she waited to board an aircraft to Washington and told them it was time to give up the hard on retaining beds. It had become a struggle that was not winnable. There were other ways to tie Trump's hands to immigration management.
Back on track
The group of four negotiators agreed to meet at 3:30 that afternoon, and when Lowey went in, she showed that the cover of the detention beds was outside the table. Suddenly the tensions eased and the staff came together to continue working on a possible deal behind the scenes, although horror seemed to consume the Capitol.
"Honestly, most of us believed it was dead at that time," recalled a house of democratic legislature. "What we all had predicted would have just happened."
That night, the group met again, this time in Leahy's Capitol Building hideaway, an office with outstanding views of the National Mall-the type that comes to be the fifth longest service senator in the chamber's history. When they sat down, Leahy made it clear to them to hit a deal. Shelby said they would not leave until a deal was completed – even though it meant they would stay the night.
Within 30 minutes they were basically done, after agreeing with the top runner, several aides said. The group broke down so that Lowey and Granger could vote in the House. They would merge at 8 o'clock
However, Lowey had not settled one thing: the last number for the frontier obstacles. The group had provisionally agreed $ 1.45 billion. But Lowey wanted to see if she could cut it by $ 75 million. She told her staff that if Republicans were balancing, she was ready to make a show storm.
Going back to Leahy's hideout, Lowey told Shelby to make sure democratic voices were in the house, the biggest thing she could agree on would be $ 1.375 billion for border obstacles. Something more would be a breach of contract. Shelby logged off and Lowey didn't have to storm after all.
Within 90 minutes they had a deal in principle to announce. "If the four of us couldn't get it together, this Congress could never," Leahy said later. "But we've got it together."
House Democrats told their home security staff to go home, as most had barely slept a few days. They had to be fresh for the final pressure to put the actual pen into paper to prepare the contract.
Shelby sells Trump
Shelby is now facing the incomprehensible task of selling the deal to the president. Not only was Trump unhappy with it, but conservative talking heads and pundits were upset. Sean Hannity called it "junk", Ann Coulter, tweeted, "We thought Trump was going to be different," and Fox News anchor Laura Ingraham called the bill a "total scam" and urged the president not to sign it.
Shelby and McConnell were also cautious about never asking Trump for a commitment to sign the bill. While giving the President's room to make decisions, it led to uncertainty among Republican legislators. On Thursday, it became clear that there were problems within the White House.
While most White House officials urged Trump to accept the deal, a handful of immigration officials claimed it was a major concern. The agreement as it was written, they claimed, tied the president's hands and would undermine their immigration policy and authority. On one occasion, working chief of staff Mick Mulvaney proposed a short-term financing bill to send negotiators back to the table.
McConnell sells the deal
This was exactly what McConnell had worked to avoid. Trump was particularly worried that the bill would limit his ability to move money around for border obstacles. As GOP congressional staff continued to go White House staff through the end bill efforts ("a complete and total gate" according to a person involved in the process), McConnell continued in regular contact with Trump – talking to him several times by phone the day moved.
But there was no one playing the role of Trump, and when the clock ticked down Thursday afternoon, McConnell finally got his support by doing something he knew could have serious consequences for his conference: he told the president that he would restore his plan to explain a national emergency.
"It was a tradeoff," said a republican official familiar with the final conversation with Trump. McConnell wasted no time in the deal, went straight to the Senate's floor, interrupted a colleague, and informed the public that the president would sign the bill.
Asked about the final call, McConnell made it clear that the goal was simple: find a way to get it done – and finally put an end to the 57 day fiscal drama.
"We talked about the bill," McConnell said with his typical fact. "I invited him to sign it. That was my focus".