Former Bush administration Cabinet member Mel R. Martinez won a bitterly fought Republican Senate primary on Tuesday in what appeared to be a smoothly conducted election that allayed some fears about Florida's oft-troubled voting system.

Martinez is attempting to become the first Cuban American elected to the Senate. He could help President Bush's reelection hopes in this battleground state by boosting turnout in November in South Florida among Cuban Americans, a group that has traditionally favored conservative Republicans.

Martinez overcame a torrent of bad publicity over the weekend about his campaign tactics. He was widely criticized for an ad that suggested his leading opponent, retired congressman Bill McCollum, was a supporter of gay rights because McCollum favored federal hate-crime laws that had bipartisan approval. Martinez, who resigned as secretary of housing and urban development to run for the Senate, also sent out a flier that said McCollum was "the new darling of homosexual extremists."

Martinez collected 45 percent of the vote, with 84 percent of precincts reported, easily outdistancing McCollum, who received 31 percent. Martinez will face Betty Castor, a former state education commissioner, who won the Democratic primary with 58 percent of the vote.

At his election-night party, Martinez said he had few differences on issues with his Republican opponents, "but the differences between me and Betty Castor are great."

Sen. Bob Graham (D-Fla.), who is retiring after 18 years in office, introduced Castor in Tampa, calling her "a worthy successor."

Castor withstood a barrage of attack ads bought by an independent group started by a former campaign finance manager to her chief opponent, Rep. Peter Deutsch. The ads criticized Castor for not firing a professor -- Sami al-Arian, who was being investigated for alleged terrorist links -- while she was president of the University of South Florida. Al-Arian was indicted last year, four years after Castor left the university, on charges of raising money for Middle East terrorist attacks.

The primary was held while residents in South Florida and other parts of the state were preparing for the possible arrival of Frances, a massive hurricane projected to make landfall this weekend. It was approaching just two weeks after Hurricane Charley caused billions of dollars of damage in the state. In Charlotte County, one of the areas most damaged by Charley, the devastation forced elections officials to consolidate voting from the usual 80 polling places into 22.

The hurricane jitters were matched by worries about the voting process -- everything from absentee ballots to voting machines -- in Florida, which has spent millions of dollars to try to avoid a replay of the chaotic 2000 presidential election. Theresa LePore, creator of the "butterfly ballot" that caused such confusion in 2000, trailed in her reelection contest as Palm Beach County elections supervisor. With 82 percent of the ballots counted, Democrat Arthur Anderson had 89,450 votes (52 percent) to 83,610 (48 percent) for LePore.

"We very much view this [primary] as excellent preparation for November 2nd," George Burgess, Miami-Dade County manager, said Tuesday.

Despite worries about touch-screen voting machines and poll-worker mistakes, voting seemed to go well, with few problems reported by the dozens of poll monitors who surveyed for errors.

"It worked really well. No chads!" Regina King said as she left a polling place in Coconut Grove.

The primary was not without its hiccups. In Broward County, where polls opened late and closed early during the 2002 Democratic gubernatorial primary, voters arrived at one precinct to discover that poll workers had no keys for the building.

"We had to force our way in," said Gisele Salas, a spokeswoman for the Broward County Department of Elections. The polling place opened five minutes late.

People for the American Way, a voter rights group based in Washington that has been critical of Florida elections officials, said its lawyers and activists fielded about 40 calls an hour during the day, many from voters confused about changes in polling locations.

"Not unexpectedly for a primary, there have been few controversies," said Ralph Neas, the group's president. "But history demonstrates that the overwhelming potential for widespread voter disenfranchisement and problems at the polls occurs during the general elections in November."

Neas's wariness was echoed outside a firehouse polling station in Coconut Grove, where Richard Houlihan, a criminal defense lawyer and lifelong Democrat, worried that he had no way of being sure how the touch-screen voting machine performed because there is no paper record of his vote. "I don't want to rely on the computer," Houlihan said.

But, for most, it was a day to marvel at the lack of problems in a state so familiar with elections that turn into messes. Even little things, things that might be taken for granted elsewhere, were big news here. Most of the day, the Miami Herald Web site carried this headline: "Polls open on time in Broward."

Special correspondent Catharine Skipp contributed to this report.

Former Bush Cabinet member Mel R. Martinez defeated ex-congressman Bill McCollum in the GOP primary.