(CNN) Senate Majority Leader Mitch McConnell said Tuesday if a Supreme Court vacancy occurs during next year's presidential election, he would work to confirm a nominee appointed by President Donald Trump.

That's a move that is in sharp contrast to his decision to block President Barack Obama's nominee to the high court following the death of Justice Antonin Scalia in February 2016.

At the time, he cited the right of the voters in the presidential election to decide whether a Democrat or a Republican would fill that opening, a move that infuriated Democrats.

Speaking at a Paducah Chamber of Commerce luncheon in Kentucky, McConnell was asked by an attendee, "Should a Supreme Court justice die next year, what will your position be on filling that spot?"

The leader took a long sip of what appeared to be iced tea before announcing with a smile, "Oh, we'd fill it," triggering loud laughter from the audience.

RELATED: Thomas, Ginsburg draw battle lines for future abortion cases

David Popp, a spokesman for McConnell, said the difference between now and three years ago, when McConnell famously blocked Judge Merrick Garland's ascension to the Supreme Court, is that at that time the White House was controlled by a Democrat and the Senate by Republicans. This time, both are controlled by the GOP.

McConnell's remarks were viewed by CNN on the website of WPSD TV in Paducah.

McConnell hinted at this position during an October appearance on Fox News Sunday when host Chris Wallace pressed the senator on whether he would fill a vacancy should one occur in 2020.

"We'll see whether there's a vacancy in 2020," McConnell replied without directly answering what he would do.

McConnell has made the confirmation of federal judges a key part of his Senate legacy and a highlight of his stump speech in Kentucky where he is running for a seventh term.

At the lunch, he said overhauling the judiciary is the best way to have a "long-lasting positive impact" because "everything else changes."

"I remember during the tax bill, people were agonizing over whether one part of the tax bill was permanent or not. I said, 'Look, the only way the tax bill is permanent depends on the next election,' " McConnell said. "Because people have different views about taxes in the two parties and they approach it differently when they get in power."

"What can't be undone is a life time appointment to a young man or woman who believes in the quaint notion that the job of the judge is to follow the law," he said. "That's the most important thing we've done in the country, which cannot be undone."