Senate Majority Leader Mitch McConnell, R-Ky., is looking back 138 years as he opens the door to considering another Supreme Court nominee from President Trump in an election year.

That’s the last time a Supreme Court vacancy was filled in a presidential election year with a nominee from a president of one party and confirmed by a Senate controlled by the other party. It was a rare period of divided government with a Republican in the White House and the first Democratic Senate majority since the Civil War.

In 1880, a Democratic-controlled Senate confirmed Republican President Rutherford B. Hayes’ nomination of William Woods in a 39-8 vote. Even Woods was nominated in December, after that year’s presidential election.

Woods had been a Democrat before becoming a Republican during the Civil War. He was the first person from a Confederate state placed on the Supreme Court since 1853. He was confirmed by the first Democratic Senate majority since 1861. Woods served just six years and died in 1887.

McConnell has been challenged on whether his new caveat about the White House and the Senate being controlled by the same party is consistent with his refusal to even consider President Barack Obama’s nomination of Merrick Garland to fill a vacancy created by Justice Antonin Scalia’s death in 2016.

[Related: Mitch McConnell: Forget Merrick Garland, GOP can confirm a Supreme Court justice in 2020 if it wants]

The Scalia seat remained empty throughout the ensuing presidential campaign and was finally filled by Justice Neil Gorsuch, who was nominated by Trump and confirmed by a Republican Senate. Republicans argued this gave voters a chance to weigh in on which president or party they wanted making the lifetime appointment.

McConnell insists precedent is on his side. "What I told you is what the history of the Senate has been," McConnell told Fox News. "You have to go back to 1880 to find the last time a vacancy created in a presidential election year, on the Supreme Court, was confirmed by a Senate of a different party than the president."

Hayes’ next nominee to the Supreme Court was Stanley Matthews in 1881. Matthews’ nomination was resubmitted by President James Garfield later that year and he was confirmed 24-23 — the only Senate confirmation margin smaller than Justice Brett Kavanaugh’s.

There is no guarantee there will be any vacancies on the Supreme Court next year, though two Democratic appointees are at least 80 years old. Republicans are narrowly favored to retain the Senate in the midterm elections. Kavanaugh’s confirmation leaves conservatives with a 5-4 majority on the nation’s highest court.