WASHINGTON -- If the Minnesota Senate recount goes anything like the microscopically close governor's race in Washington state four years ago, the Legislature will pass a bevy of new laws and the loser will write a book.

There might even be a rematch.

That's how it played out after the 2004 recount victory of Democrat Christine Gregoire, who overcame a 261-vote election night deficit to edge out Republican Dino Rossi. The final margin -- decided after a protracted court battle -- came to 133 votes, making it the closest gubernatorial race in U.S. history.

The tiny margin, out of 2.9 million votes cast in a three-way race, is often compared in terms of size and magnitude to the current Senate race in Minnesota, which could be even closer.

"I'm watching the recount in Minnesota and thinking it's déjà vu all over again," said Seattle attorney Jenny Durkan, one of Gregoire's lawyers and closest confidants.

Though Washington state Democrats hailed Gregoire's dramatic come-from-behind victory with Ukrainian-style orange arm bands, stone-faced Republicans took their case to court, bitter that Rossi was denied an apparent election night victory.

"It was amazingly tense -- drama of the highest order," said former Associated Press reporter David Ammons, who covered the race before going to work for the Washington secretary of state.

If a similar scenario plays out in Minnesota, the bad blood will linger and the courts might still be deciding this case in June.

Another sobering prospect: Rossi eventually lost but never stopped running. He wrote a book and mounted this year's rematch against Gov. Gregoire. This time, in what many voters saw as a grudge match, Gregoire won by six points.

The wider margin was vindication for Gregoire, though not necessarily for Washington state's election system, which has undergone a number of reforms since 2004. Among them are a statewide voter registration database, early primaries and near universal mail-in voting. Some say mail-in ballots dispense with much of the messiness of traditional polling-place voting, such as long lines. Others say they're a source of even more error and controversy, as officials in Minnesota and Washington state can attest.

Either way, because of Gregoire's relatively comfortable margin of victory, the November rematch was no test for Washington's revised election system.

"If there was another extremely close election, I have no reason to believe it wouldn't be just as messy," said Chris Vance, who was the state's Republican Party chairman in 2004. "Only God knows who won that election [in 2004]. It was so screwed up."

'Room for mischief'

Washington state Republicans still contend that the Democrats snatched the election from Rossi using many of the same tactics they are seeing in the Minnesota standoff between Republican incumbent Norm Coleman (who also led by triple digits on election night) and DFL challenger Al Franken.

"They're trying to qualify ballots that were thrown out," Vance said. "You shouldn't be able to do that once you know the results. It opens all kinds of room for mischief, because you know how many votes you need."

Washington state Democrats, on the other hand, took the same line as their DFL counterparts in Minnesota. "Democrats want every legitimate vote to count," said political strategist Paul Berendt, who chaired Washington state's Democratic Party in 2004 and has aided in the Minnesota recount. "Whether you are in Washington state or Minnesota, there are thousands and thousands of ballots that go uncounted in every election."

The 2004 recount in Washington state, like the 2008 recount in Minnesota, turned up missing ballots, wrongly marked ballots and other polling irregularities that would have gone unnoticed in an ordinary election. These problems came as a shock to officials in both states, which share a reputation for good government and clean elections.

"I remember on election night [in 2004] talking to our media consultant, who was from Florida," said Rossi spokeswoman Mary Lane. "We were like, 'Ah, Washington is nothing like Florida. We run totally clean elections, totally boring.' And then, as the recount progressed, we were horrified to learn what goes on in the underbelly of an election."

Among the things that went on, Republicans alleged, were votes cast by felons, double voters and dead people. Democrats say the GOP's allegations of fraud were unsubstantiated or overstated. But nobody denies that mistakes were made, which hurt both sides. For example, one batch of more than 700 rejected mail-in ballots was set aside to recheck signatures and promptly forgotten -- until King County Councilman Larry Phillips, a Democrat who had been in Ohio on Election Day working on John Kerry's campaign, discovered that one of the rejected ballots was his own. Phillips, a veteran Seattle politician, became an instant poster child for voter disenfranchisement.

'Magical mystery ballots'

The first recount was automatic: Washington state, like Minnesota, required it because of the tiny margin. This machine recount ended with a shrunken Rossi lead of 42 votes. A second recount -- a hand count initially paid for by the Democrats -- gave Gregoire a 10-vote lead. That was expanded to 129 once the state Supreme Court allowed several hundred of the newly discovered King County ballots, which the Republicans dubbed "magical mystery ballots."

At the end of December, amid frayed nerves all around, Washington Secretary of State Sam Reed, a Republican, declared Gregoire the winner. But Rossi's forces went to court, alleging that there were enough disputed votes to overturn the election.

The GOP suit was decided the following June, six months into Gregoire's new administration. Superior Court Judge John Bridges found evidence of nearly 1,700 illegal votes but ruled there was no way of telling for whom they were cast, except in the cases of four felons who swore statements saying they had voted for Rossi.

That pushed Gregoire's official margin up to 133, hardly the result the Republicans were seeking.

Because they won, the Democrats got their recount money back. But between them, the two parties racked up more than $10 million in legal fees, according to Berendt.

Rossi went back to his job in real estate and penned a book, "Dino Rossi: Lessons in Leadership, Business, Politics and Life."

"I'm still stunned," said his spokeswoman, Mary Lane. "I still think he won."

The Democrats remain philosophical about their untidy election.

"Democracy can be messy," said Jenny Durkan, Gregoire's adviser. "That doesn't mean it's corrupt or evil. It just means it's human."

Kevin Diaz • 202-408-2753