The announcement on Wednesday afternoon that Justice Anthony Kennedy will retire from the Supreme Court was a vindication for Trump’s evangelical defenders, who had one message for voters in 2016: Close your eyes and think of the Supreme Court. No matter how a Christian might feel about Trump as a man (the extramarital sex, the mockery of the disabled), they said, he would have a chance to radically reshape the makeup of the Supreme Court. This week, that calculation paid off.

It is hard to overstate how relentlessly Trump’s evangelical supporters promoted this message, especially as the campaign staggered toward Election Day. The emergence of the Access Hollywood tapes in October 2016 was widely expected to threaten Trump’s advantage among white evangelicals. A thrice-married casino mogul was one thing, but one whom voters could actually hear bragging about grabbing pussy?

“Hold your nose and go vote,” evangelist Franklin Graham told about 10,500 attendees at a prayer rally in North Carolina in 2016, circling the wagons after the tapes emerged. “You have to decide which one of the two (presidential candidates) that you would trust to appoint justices that are going to protect our religious freedom as Christians.”

Graham’s “hold your nose” was the closing message from the old-school religious right in the weeks before the election. “My personal support for Donald Trump has never been based upon shared values,” Family Research Council head Tony Perkins said after the tapes’ release. “It is based upon shared concerns about issues such as: justices on the Supreme Court … ” In a conversation at Liberty University, Jerry Falwell Jr. emphasized that the court’s makeup was a much more important issue than Trump’s personal flaws. “Five years from now when we’re sitting here and we see all the Constitution being ripped apart by justices [appointed by Hillary Clinton], nobody is going to remember what horrible things Donald Trump said over a decade ago,” Falwell said. Ralph Reed touted Trump’s list of potential Supreme Court picks relentlessly in speeches throughout 2016. As conservative Catholic columnist Hugh Hewitt had put it over the summer: “It’s the Supreme Court, stupid.”

Sure enough, when asked which issues were “very important” to them in the election, white evangelicals were significantly likelier to list Supreme Court appointments than abortion. (Terrorism and the economy topped the list.) When asked which candidate would do a better job selecting Supreme Court justices, 74 percent said Trump. In other words, the pitch from the religious right worked—for some voters, because it made tactical sense, and for others, because it gave them cover to vote for the person they wanted to vote for anyway.

In the end, about 80 percent of white evangelicals voted for Donald Trump on Nov. 8, 2016. Some of them have since soured on Trump. But many are celebrating today nonetheless because of the promise that Kennedy’s retirement will lead to a rollback of abortion access and favorable outcomes for conservatives in religious-liberty cases.

Social conservatives were already cheered by Trump’s nomination of Neil Gorsuch last year, which they saw pay off this week with the ruling that crisis-pregnancy centers in California do not need to provide information about abortion. Hours before Kennedy’s retirement was announced on Wednesday, Reed tweeted that the week’s decisions about abortion and the travel ban were “a strategy vindicated.”

Trump, for his part, knows he has a winning issue with this segment of his base. “I think people are going to love it,” the president teased last year, a few days before he nominated Neil Gorsuch to the court. “I think evangelicals, Christians will love my pick.”