During the third and final debate between Hillary Clinton and Donald Trump, moderator Chris Wallace asked Trump whether he would accept the results of the Nov. 8 election. Before telling the audience he would keep them in suspense, Trump answered, "I will look at it at the time."

In a campaign appearance the next day, Trump never fully walked back his answer. He said he would accept the results of the election only “if I win,” adding that he is “reserving the right to mount a legal challenge in the case of a questionable result.”

While it pleases many of his supporters to hear him say that he would contest an election that does not name him the winner, could Trump reasonably mount a legal challenge to an election he loses?

>> Got a question about the news? See our explainers here  

It’s complicated.

Elections are state-by-state affair

That means that each state runs its own elections,and each state has its own set of laws that regulate the counting of the ballots in those elections.

Included in those laws is one that says that the votes counted on election day are preliminary results. The results are not official until they are certified.

The vote count can change in that time. Often, absentee ballots are counted after election day, as are provisional ballots, or ballots used to record a vote when there is a question as to whether the voter is eligible to vote. This could happen because the voter’s name does not appear on the list of names at a certain polling place, or, if in states where voter ID is required, the person does not have identification with them.

What about close elections?

Some states allow candidates to request recounts, and in other states,recounts are automatically triggered if the ballot count is close – usually if the difference in the count is less than one-half of one percent of the total vote.

As far as close elections go, it doesn’t get much closer than the 2000 presidential election between Al Gore and George W. Bush. The two candidates were separated by a little more than 500 votes in Florida, which had 25 votes in the electoral college.

A recount of ballots was triggered in several counties because of the closeness of the vote totals, lawsuits were triggered by the counting, and, in the end, the counting was stopped by the U.S. Supreme Court, which ruled that there was a violation of the Equal Protection Clause when different standards of counting ballots were used in different counties.

By the time the Supreme Court took the case, there could be no way to standardize the counting of ballots put into place within the time limit – Dec. 12 – that year. According to the Constitution, “The electors of President and Vice President of each State shall meet and give their votes on the first Monday after the second Wednesday in December …”

The Constitution goes on to say,"any controversy or contest concerning the appointment of all or any of the electors of such State, by judicial or other methods or procedures, and such determination shall have been made at least six days before the time fixed for the meeting of the electors, such determination made pursuant to such law so existing on said day, and made at least six days prior to said time of meeting of the electors, shall be conclusive, and shall govern in the counting of the electoral votes as provided in the Constitution, and as hereinafter regulated, so far as the ascertainment of the electors appointed by such State is concerned."

In other words, any problems with electing the “electors” must be addressed and corrected by six days prior to the meeting of the electors “on the first Monday after the second Wednesday in December.”

In the 2000 election, Al Gore won the popular vote, but lost the vote in the Electoral College. George W. Bush then became president.

Does the Supreme Court often intervene?

The United States Supreme Court can intervene as it did in Gore v Bush, but that is extremely rare. Most any legal issue is dealt with at the state level.

Must a losing candidate concede?

As for conceding a race, there is no requirement that a person who loses the presidential election concede the race. It is simply tradition that the losing candidate concede the race. Likewise, it doesn’t really matter if the person “agrees” with the results or not.

The only thing a concession does, really, is to serve to legitimize the election for the loser’s supporters

What happens after Nov. 8?

Whether the loser of the 2016 race concedes or not, the result of state elections will be certified under the laws of each state. The electors who are chosen on Nov. 8 (remember, we vote for electors, not candidates) will cast their ballots in December, and that count will be read and certified in a joint session of Congress on Jan. 6, 2017.