If Donald Trump voluntarily dropped out of the presidential race or was replaced by party leaders as the Republican candidate, the resulting state-by-state scramble to put another name on the ballot wouldn’t be clear or straightforward. What’s apparent is the longer any such decision is delayed, the harder it would be for Republicans keen to avoid costly legal fights to navigate ballot issues in each state that could bleed resources from other election efforts.

Friction between Trump and top Republicans, and mounting questions about his fitness to be commander in chief, have stoked comment and concern about how such a change would launch the election into largely uncharted legal waters.

Maine Republican Sen. Susan Collins on Monday became the latest GOP lawmaker to declare she won’t vote for the party nominee, joining fellow Sens. Ben Sasse of Nebraska, Lindsey Graham of South Carolina and Mark S. Kirk of Illinois. Arizona’s Jeff Flake has repeatedly said he cannot back Trump yet.

Even before any legal battles to replace Trump, Republican officials would need to work through a process for agreeing upon a new candidate.

Republican National Committee rules spell out options for selecting a new candidate for president in the event of, “death, declination or otherwise,” including one that allows RNC members from a state to cast the same number of votes as that state cast at the national convention. The replacement nominee would be required to get a majority vote in such a process.