AP

Senate Minority Leader Mitch McConnell began plotting his counter-attack just a few days after President Barack Obama made an end-run around Senate Republicans and unilaterally moved to fill slots on the National Labor Relations Board in January 2012.

One night that month, McConnell called a small group of his top advisers into his conference room, a red-painted chamber that faces the National Mall and is lined with oil paintings of famous Republican statesmen. With the smell of a wood-burning fireplace wafting in from a nearby room, McConnell and his advisers talked about how to challenge what they viewed as an unprecedented abuse of power from the executive branch.

That meeting is cited as one of the key early developments that led to the eventual, universal rebuke of Obama's move by the Supreme Court on Thursday. In a 9-0 decision written by liberal Justice Stephen Breyer, the high court ruled Obama violated the U.S. Constitution when he made the recess appointments during a brief break in the Senate's work.

"We did win 9-0, including — however you want to pigeonhole or characterize individual judges' respective jurisprudence on some sort of continuum — by definition you had it from the most liberal to the most conservative," a source with knowledge of McConnell's efforts on the case told Business Insider.

When he appointed the three NLRB members, Obama said he was forced to do so. He argued Senate Republicans sought to stop the board from functioning by refusing to confirm any of his nominees, thereby leaving slots vacant and the board unable to do its job. At issue in the case was Obama's use of the Recess Appointments Clause to fill the slots on the board. That clause states the president may fill a vacancy during the recess period between Senate sessions.

Republicans argued they were meeting during the recess — in so-called pro forma sessions every three days — and still maintained control over the confirmation process. But t he administration said the pro forma sessions held by the Senate every three days during the intrasession break were only a sham designed to keep Obama from filling the posts.

At the meeting McConnell's team agreed they were left with two options to proceed, since Senate Majority Leader Harry Reid would not authorize an institutional lawsuit on behalf of the Senate. Senate Republicans concerned about Obama's use of recess appointments could either sue as individual members, or they could join a private party case as a group.

McConnell's advisers saw complications with the first option. It was questionable whether they could prove they had standing to sue the administration. They also worried about the perception of a lawsuit that pitted them squarely against the president.

They decided they would join a private-party case. McConnell tasked John Abegg, one of his top aides, with finding the right suit — one in which the facts and injury were clearly laid out and legal theory was solid.

Abegg soon discovered Noel Canning, a division of the soft-drink bottling company Noel Corporation. The company had sued after the NLRB ruled against it in early 2012, saying the business engaged in an unfair labor practice by not entering into a collective bargaining agreement. Noel Canning and Senate Republicans formed a partnership. The U.S. Chamber of Commerce also represented Noel.

"Noel certainly took a huge risk," Gary Lofland, one of the lawyers representing the company, told Business Insider. "It was a really gutsy move to challenge the President of the United States on something like this, coming from a very small company."

Republican senators retained Miguel Estrada, an attorney who served as the Assistant to the Solicitor General for the George H.W. Bush administration. McConnell's team felt it was on solid ground by January 2013, when the U.S. Court of Appeals for the District of Columbia Circuit sided with Noel Canning in its ruling on the case.

The legal team arguing on behalf of Noel argued the Recess Appointments Clause meant three things. Therefore, it had three ways to win the case.

View photos Mitch McConnell More