WASHINGTON — It’s never happened before, but if Hillary Clinton has to drop out before Election Day, the Democratic National Committee would pick a successor — and it wouldn’t have to be running mate Tim Kaine.

If Donald Trump faced the same situation, the Republican National Committee would select a GOP replacement, perhaps by reconvening 2,472 delegates.

Clinton’s near-collapse over the weekend, coupled with the ages of the two major candidates, have brought the far-flung scenarios into the realm of possibility.

Trump is 70 and Clinton turns 69 on Oct. 26.

There were 55 days until the election as of Tuesday and military and overseas ballots are mailed 45 days before the polls open.

Thirty-seven states have some sort of early voting, with North Carolina being the first by mail on Sept. 9.

What would really complicate matters is if a nominee had to drop out when ballots have already been cast.

“It would be an unprecedented, complicated mess,” one election lawyer said.

The Electoral College would then select the next president.

If the electors couldn’t agree, the House of Representatives would make the selection.