Turn the lights back on, the party's apparently not over yet for state Sen. Alan Bates.

Turn the lights back on, the party's apparently not over yet for state Sen. Alan Bates.

In a stunning, last-minute reversal of electoral fortunes, Bates, D-Medford, edged ahead of Republican challenger Dave Dotterrer by 240 votes late Wednesday. If the outcome holds, it would not only save his own seat but prevent a 15-15 deadlock in the Oregon Senate.

As ballot counting neared the end, the Jackson County Elections Office reported Bates with 24,049 votes, or 50.2 percent, and Dotterrer with 23,809, or 49.7 percent.

A small number of ballots remain uncounted in Jackson County — those rejected by machines and those turned in to other counties' elections offices, said County Clerk Chris Walker. She said the amount remaining to be counted was less than 1 percent of the ballots cast, but noted the county has 20 days to deliver a firm count.

An automatic recount would be triggered by a difference of less than one-fifth of 1 percent of the votes cast for both candidates, which would be about 95 votes under the current total, said Walker. If that threshold is not reached, the losing candidate could request a recount, but would have to pay for its cost.

The tight race has been followed closely across the state because of the implications for control of the Senate. Earlier Wednesday, The Oregonian newspaper declared Dotterrer the winner.

Dotterrer never trailed until the Wednesday evening results were posted. He led by more than 1,000 votes in preliminary results released on election night, but his lead dwindled to about 600 Wednesday morning and then to 103 early Wednesday afternoon.

While the latest results point to a dramatic comeback, Bates was not ready to declare victory Wednesday evening, noting the uncertainty of outstanding ballots and the possibility of a requested recount by Dotterrer.

If Bates holds onto his seat, the Oregon Senate likely will form with a 16-14 Democratic majority. The outcome in one other Senate district is undecided: In the Canby area's District 20, Republican challenger Alan Olsen was holding a 300-vote advantage over incumbent Democrat Martha Schrader. The Oregon House will convene deadlocked at 30-30.

"We're keeping our fingers crossed," said Bates. "It looks like we won, but, no, I don't want to assume we won till I've heard from Dave (Dotterrer). I won't be surprised if he asks for a recount."

Bates, a physician, has been in the Legislature for a decade, first elected to the House in 2000 and then to the Senate in 2004.

Dotterrer, a retired Marine officer who lives in Ashland, declined to concede the race, noting the ballots yet to be counted. He said he didn't know yet whether he would call for a recount if Bates kept the lead.

"We have a lot of the process to work through over the next several days and we'll see what the outcome is," Dotterrer said.

The count giving Bates the edge includes all ballots, said Walker, except those rejected by machines or put in drop-boxes in other counties, which is allowed by law.

At midday Wednesday, Bates said his re-election seemed "a long shot" and he predicted much horse-trading stretching out many weeks in a Senate that appeared would be deadlocked 15-15 and trying to overcome partisan bitterness.

Dotterrer, in an interview when he held a 600-vote lead, said he hoped the Senate, which appeared to be deadlocked, would see that "parties can work with each other and put their cards on the table."

John Darling is a freelance writer living in Ashland. E-mail him at jdarling@jeffnet.org.