In March 1888, when Chief Justice Morrison Waite died suddenly and unexpectedly — not unlike Justice Scalia — just as President Grover Cleveland was running for a second term, the president nominated a new chief justice, Melville W. Fuller, to replace him. The Senate confirmed the nomination at the end of July.

Of course, none of these represents an exact parallel to today’s situation. In all but one of these instances, the president and Senate majority were of the same political party, unlike today. Only Mr. Cleveland (a Democrat) faced a Senate controlled by the opposition party, while President Hoover’s Republican Party held only a one-vote majority in the Senate. Still, in both of these instances, the nominees were confirmed by wide margins. In fact, the 1932 confirmation of Justice Cardozo was unanimous.

Three times presidents who were on their way out of office — “lame ducks” in the truest sense — appointed justices to the court. In December 1800, the resignation of Chief Justice Oliver Ellsworth allowed John Adams, who had already lost to Thomas Jefferson, the chance to select the justice’s successor. Mr. Adams chose John Marshall, who went on to serve 34 years as the nation’s fourth and greatest chief justice. In February 1845, a month before he left office, John Tyler nominated Samuel Nelson, who won Senate confirmation and served for the next 27 years.

And when the resignation of Justice William Strong occurred after the 1880 election, the departing president, Rutherford B. Hayes — not his successor, James A. Garfield — nominated Justice Strong’s successor, Justice William B. Woods.

In the Adams and Tyler examples, two unpopular departing executives carried out their constitutional duties and overcame political factionalism from inside and outside of their own parties.

To be sure, the Senate has rejected nominees for political reasons, increased the size of the court (for instance, during the Civil War) or reduced it (immediately after the Civil War). But in cases when vacancies have arisen during election years, the weight of history is clearly on the side of the president naming a successor and the Senate acting on that nomination.

The Republicans, who frequently cite the Constitution and look to historical precedent, have an opportunity to be true to their principles. They should ignore Donald Trump’s urging to “delay, delay, delay,” and help ensure our Constitution functions as it should — and as it has in the past.