As President Trump reveled Tuesday in the Supreme Court's 5-4 travel ban decision – a ruling the White House described as a "moment of profound vindication" -- Senate Majority Leader Mitch McConnell took a victory lap of his own, tweeting a photo himself with the newest justice, Neil Gorsuch.

The tweet sent a clear message that without the Kentucky Republican's controversial gambit to block then-President Obama's nominee, Merrick Garland, in 2016, the most consequential court decision for the Trump administration so far could have easily gone the other way. And it was a not-so-subtle reminder to Republican voters about the power of party unity ahead of midterm elections that will determine the balance of power in the U.S. Senate and, therefore, the future shape of federal courts.

The makeup of the Supreme Court was a driving force for voters who backed Trump in 2016, and was seen as the galvanizing factor for Republicans reluctant to support their party's unconventional nominee for president. According to a CNN exit poll, 56 percent of Trump voters said the court was most important factor, while only 41 percent of Hillary Clinton voters said the same. Even now, Republicans count the nomination and confirmation of Gorsuch as a top accomplishment of this administration, one that often helps them overlook the president's controversies.

The high court's ruling upholding the travel ban, along with another equally narrow decision overturning a California law requiring crisis pregnancy centers to provide patients with abortion literature, underscored the consequences of elections. And given recent voting patterns, Republicans feel they’ve been given a rallying cry for the November elections.

"We were all just reminded how big a deal it was for Mitch McConnell to keep [Antonin] Scalia's seat open and for Donald Trump to keep his promise," wrote Matt Schlapp, chairman of the American Conservative Union.

"Both of these decisions would have turned out very differently if Hillary Clinton would have been putting a justice on the court," said Carrie Severino, policy director for the Judicial Crisis Network, a conservative legal advocacy group.

Tuesday’s focus on the Supreme Court also highlighted for voters the large number of federal judge vacancies, and the impact party control of the presidency and Congress can have on lower courts across the country. According to the Administrative Office of the U.S. Courts, there are currently 149 such vacancies.

"Judicial appointments are one of the longest-lasting impacts any president has," Severino said. "And Trump has had a historic opportunity simply because of the number of vacancies that have come up, and vacancies are arising at a dramatic pace."

Such opportunities to shape the courts are just starting to elicit action from Democrats. Former spokesman for the Clinton campaign and the Justice Department Brian Fallon is leading a nonprofit group called Demand Justice, which aims to educate and motivate voters around the judiciary. That includes putting pressure on Democratic lawmakers, too.

"A first step would be getting Senate Democrats to stop voting for Trump's judges," Fallon said, responding to Tuesday's travel ban decision. "Safe blue-state senators like [Amy] Klobuchar, [Chris] Coons and [Mark] Warner vote for them 60 percent of the time or more. They treat it as a meaningless vote."

Democrats argue that Gorsuch is occupying a stolen seat. After Scalia passed away in February 2016, McConnell insisted that high court vacancies should not be filled during an election year. He blocked hearings and votes on Garland’s nomination for 10 months. Trump mentioned the vacancy frequently during his campaign. And just 11 days into his term as president, he nominated the conservative Gorsuch.

Democratic congressional candidates at this point appear to be running more on issues like health care than on judgeships. It's unclear whether Tuesday’s court decisions will change that strategy, though it certainly provided clear opportunities to do so.

For now, at least, the rulings have the potential to unite Republicans ahead of the critical midterm elections, where the party is concerned about depressed turnout and internal divisions centered on Trump. "The ruling shows that all of the attacks from the media and the Democrat politicians are wrong, and they turned out to be very wrong," Trump said Tuesday, ahead of a lunch meeting with GOP lawmakers.