As beloved by his Tea Party devotees as Mr. West was, the voters in the new district proved less enamored of his brawling speaking style and his conservative views.

Among Mr. West’s most notable pronouncements were these: an accusation that as many as 80 House Democrats are Communists, a reference to President Obama as “probably the dumbest person walking around in America right now,” and a comment that Obama supporters with bumper stickers are “a threat to the gene pool.”

Capitalizing on those words and his opponent’s views, Mr. Murphy repeatedly told voters that Mr. West was too extreme and divisive for the area.

Mr. West, in turn, parried that Mr. Murphy was a Democratic puppet who relied on his father’s wealth and connections to get ahead. Mr. Murphy’s father owns the Coastal Construction Group, a large construction company in Miami.

Newsletter Sign Up Continue reading the main story Please verify you're not a robot by clicking the box. Invalid email address. Please re-enter. You must select a newsletter to subscribe to. Sign Up You will receive emails containing news content , updates and promotions from The New York Times. You may opt-out at any time. You agree to receive occasional updates and special offers for The New York Times's products and services. Thank you for subscribing. An error has occurred. Please try again later. View all New York Times newsletters.

In the end, Mr. Murphy won — barely.

Making it official proved difficult, however. Mr. Murphy declared victory soon after the election, but Mr. West, citing what he said were electoral irregularities, did not concede. Because Mr. Murphy’s margin was greater than 0.50 percent, there was no automatic recount. So Mr. West went to court to press for a full recount of early votes in St. Lucie County, where officials had acknowledged irregularities but said only a partial recount was necessary. His request was rejected.

But his lawyers discovered errors in vote tabulations. Some precincts in the county had tallied more votes than appeared to have been cast. It appeared others had not counted all the votes. On Friday, St. Lucie County’s canvassing board ordered a full recount of all 37,379 early votes.

The tally, completed Sunday, found that Mr. West still trailed Mr. Murphy.

Once again, Mr. Murphy declared victory. And once again, Mr. West did not concede, saying he needed to consider his options. The next evening, Mr. West huddled with his lawyers and concluded that there was no way he could win.

Mr. Murphy, the vice president of a Coastal Construction company that specializes in disaster relief and environmental cleanup, said he was “humbled” by his victory and the opportunity to speak for the people in the 18th Congressional District. He called Mr. West’s concession “gracious.”

Advertisement Continue reading the main story

“To those who supported my opponent, my door is open, and I want to hear your voice,” Mr. Murphy said. “I campaigned on a message of reaching across the aisle to get things done for the people of the Treasure Coast and Palm Beaches.”

Appearing on Fox News on Tuesday, Mr. West was asked whether he would consider another run for the House. He did not rule it out.

“Right now,” he said, only “God knows the plans for my life.”