TALLAHASSEE -- Republican Charlie Crist easily won his party's attorney general primary Tuesday, but Democrats Buddy Dyer and Scott Maddox were in a dead heat in their party's primary three hours after the polls had closed.

Crist defeated fellow Republicans Tom Warner and Locke Burt by a comfortable margin, while Maddox's gain on presumed Democratic frontrunner Dyer was a bit of a surprise. Democrats George Sheldon and Walter Dartland trailed.

"We're optimistic. We've worked very hard," Maddox said. Although worried about voting troubles in South Florida, where he was counting on support, the Tallahassee mayor said he was pleased that he was doing better than expected in the central part of the state.

Dyer couldn't be reached Tuesday evening.

Crist survived a series of attack mailers and billboards.

"I'm very gratified and very humbled," said Crist, currently the state's education commissioner. "We had a very spirited primary. I'm taking tomorrow off to respect America, but we'll be back at it Thursday," Crist said.

The final winners of Tuesday's primaries will square off Nov. 5 to become the people's lawyer, the one who sues when mass refunds are in order, when companies conspire, or when people are treated unfairly because of their race or gender.

The office also represents the state in many criminal appeals, enforces antitrust and consumer protection laws, and handles civil prosecution of criminal racketeering.

All along the attorney general race has lacked the attention given the Democratic gubernatorial primary. With less than a week to go before the primary, more than two-thirds of Democrats were still undecided, according to a St. Petersburg Times/Miami Herald poll.

That convinced three of the four Democrats to take to the airwaves and step up their television commercials in the final week. State senator Dyer, Maddox and former deputy attorney general Sheldon appealed to voters on air, while consumer advocate Dartland continued his strategy of trying to reach voters through e-mail and the Internet.

Crist ran several ads in the final days before Tuesday's primary, and Warner continued running his Spanish-language radio spots in South Florida.

Burt stopped campaigning last week, after his mother-in-law fell suddenly ill. She died Sunday, and Burt attended services for her Tuesday.

"It's made all this stuff look a little less important," said Burt, a state senator.

All candidates shook their heads over the polling place chaos in South Florida, and some worried that it might affect their chances.

Burt said he thought Secretary of State Jim Smith should have started running public service ads once Gov. Jeb Bush decided to extend the voting deadline by two hours to accommodate voters whose polling places had problems.

"It doesn't do any good to extend voting if voters don't know," Burt said.

He planned to spend the evening at home with family and friends watching the returns.

"What happens, happens," Burt said.

Solicitor General Warner said Tuesday afternoon he didn't expect to be affected by the problems in Broward and Miami-Dade; he was counting on the fact that more Republicans planned to vote absentee in this primary than in the past.

If the problems in South Florida spell trouble for any of the attorney general candidates, it could be for Maddox, who spent much of his campaign travel time courting the Democratic base there.

"We spent a tremendous amount of time and grass roots in Miami-Dade, Broward and Palm Beach counties," Maddox said.

Sheldon also spent his weekend campaigning in South Florida.

"I don't know if I am going to win or lose, but I'd like to know that I really did," Sheldon said.