PAHRUMP, Nev. — Call him a pimp. A brothel owner. A businessman.

Now call him the Republican nominee for a Nevada state Assembly seat.

It was Dennis Hof’s second shot at the seat held by Republican James Oscarson. The last time he tried, he ran as a Libertarian. But when Donald Trump was elected president in 2016, Hof saw an opportunity.

He ran as a Republican and defeated Oscarson handily Tuesday night. He got a concession from the incumbent via text message at 11:21 p.m.

“Congratulations,” Oscarson’s text read.

“Thank you,” Hof replied.

The unofficial vote tallies from the Nevada secretary of state’s office Wednesday showed Hof winning 42.8% to 36.5% — a margin of fewer than 500 votes.

Hof, who has billed himself as the “Trump from Pahrump,” nabbed the endorsement of Nye County’s Republicans. He attacked Oscarson with billboards and online ads that called him a “serial tax hiker” and portrayed him in unflattering cartoon images. One likened Oscarson to a monkey.

Oscarson didn’t take it lying down, however. His campaign noted Hof had been accused of sexual assault and tried to further impugn his moral character by pointing out that he was the author of “The Art of the Pimp.”

Hof’s bid for the seat drew national attention due to his outsized reality television persona on an HBO series that took place in one of several brothels he operates in Nye and Lyon counties.

Laura Billman, Oscarson’s spokeswoman, said they felt they had been running behind the entire race. When the unofficial Nye County numbers came in — 2,372 votes for Hof and 1,465 for Oscarson — Billman said they knew the numbers couldn’t be made up in Clark and Lincoln counties.

“Nye County voters don’t like incumbents,” she said.

Nevadans also went to the polls Tuesday to help decide who will take over the governor’s seat, now occupied by Republican Brian Sandoval. Fellow Republican Adam Laxalt, the state attorney general, easily advanced to the November showdown.

Laxalt will face Steve Sisolak, who defeated a fellow Clark County commissioner, Chris Giunchigliani, for the Democratic nomination.

In the race for U.S. Senate, Democratic Rep. Jacky Rosen and incumbent Republican Dean Heller both easily won their parties’ nominations.

Clark County Sheriff Joe Lombardo — who gained a national profile overseeing the police response to the Las Vegas shooting on Oct. 1 that left 58 people dead — declared victory after winning nearly three-quarters of the vote.

Nevada was one of five states that held primaries Tuesday — bringing the total to 21 so far heading into the midterm election. Democrats are aiming to flip enough congressional seats to seize control of the House of Representatives. And following the #MeToo movement, a record number of women have been running for office.

Hof’s bid comes as a petition drive is underway in Nye and Lyon counties to eliminate their brothels. Activists in the two counties, which have 40% of the state’s brothels, have until Friday to gather enough signatures to qualify for the November ballot.

Some have said the petitions are aimed at Hof. In February, the Nye County sheriff shut down the the Hof-owned Love Ranch near Pahrump over building code violations.

At the Bob Ruud Community Center in Pahrump on Tuesday, voter traffic was heavy as people sought the shadiest path possible to cast their ballots. Temperatures hit 106.

Brett Chunley, 45, wore sunglasses and repeatedly wiped his brow outside after casting his vote for Oscarson. He said there was no way he’d vote for Hof.

“He was an embarrassment before he ran for office,” Chunley said. “He’s even more of one now.”

He said Hof was ridiculous, noting he’d at one point endorsed Hillary Clinton with his “Hookers for Hillary” campaign. “And now he says he’s a conservative Republican? Please.”

Nevada State Assembly District 36, which primarily covers deeply red Nye County, also includes portions of Lincoln County and a small part of Clark County, for a total population of about 67,000.

Jim Raubolt, a 55-year-old electrician, said he couldn’t bring himself to vote for Hof or Oscarson and instead voted for Joseph Bradley, the third GOP candidate, who largely slid under the radar while the other two engaged in their high-profile battle. Bradley picked up 20.7% of the vote.

But Raubolt said if Hof won the nomination, he would vote for the pimp in November.

“The Democrats keep electing knuckleheads,” he said.

Sean Hunt, sitting in the back of his white pickup, was distributing white T-shirts that read, “Protect Nye County freedom.”

He said he voted for Hof.

“I did it to piss people off,” he said. “It’s the same reason I voted for Trump. I knew it would drive liberals crazy.”

Nye County went for Trump handily in 2016, giving him 68% of the vote — though Nevada overall went for Clinton. Hof will face Democrat Lesia Romanov in the general election.

At the Nye County Republican Party headquarters Tuesday night, two cardboard cutouts of Trump and Ronald Reagan were propped against a wall. A man at the front door was watching conspiracy theorist and far-right agitator Alex Jones on his computer as Republicans filtered in and waited for Hof and other candidates to arrive.

Hof walked in around 7:45 p.m. wearing an American flag shirt, blue jeans and red socks.

He was presented with a sign painted in red, white and blue that read, “Dennis Hof, the Trump of Pahrump.” He posed for pictures with it and got a round of applause from the approximately 100 people in the room. Former “Hollywood Madam” and reality TV personality Heidi Fleiss was in attendance, wearing a T-shirt that read “Vote Hof.”

When it was clear Hof had an insurmountable lead, champagne was brought out. Corks were popped. Pictures were taken. Nye County Republican Central Committee Chairman Joe Burdzinski stood before a crowd of about two dozen and looked at Hof.

“You won,” he said.

Hof said he couldn’t have without appearances by influential conservatives Grover Norquist and Roger Stone.

“This is American history,” Hof said. “I feel like right won over might and another RINO [Republican in Name Only] got fired.”

david.montero@latimes.com

Twitter: @davemontero