Steve Monte­negro, facing accusations of inappropriate behavior, is locked in a tight primary contest with 11 other Republicans vying for the GOP nomination in Arizona’s 8th Congressional District. He has rejected the accusations. (Ross D. Franklin/AP)

Arizona Republicans picked Debbie Lesko, a former state legislator, as their nominee to replace disgraced former congressman Trent Franks Tuesday night — after a race that was rocked by more allegations of inappropriate behavior.

Lesko pushed past 11 other Republicans, including Steve Montenegro, a rising conservative star who had been endorsed by Franks and some national conservative figures and then tumbled into a scandal over racy text messages sent by a staffer. Lesko, the only woman in the race, built a 12-point lead over Monte­negro in early votes, with Tuesday’s final ballots pushing her over the top to win the Republican nomination for the April 24 special election for Arizona’s 8th Congressional District.

With 55 percent of all votes counted, Lesko had won 35.8 percent of the vote to 24.1 percent for Monte­negro, the Associated Press reported.

Montenegro conceded the race Tuesday night after early ballots were counted.

“That is a seat that we could lose if we have a damaged candidate,” said Sen. Jeff Flake (R-Ariz.), who is retiring this year and made no endorsement in the race. “We’ve learned that lesson. There’s a 20-point Republican edge there, but there was a 26-point Republican edge in Alabama,” he said, referring to the special election to replace Attorney General Jeff Sessions that Republicans lost.

Democrats elected Hiral Tipirneni, a physician and political activist, to vie for the seat that Franks had always won easily. Franks, who had been in the House since 2003, resigned last year amid the public fallout from his having urged a female staff member to bear his child as a surrogate. His resignation created a rare opening in Phoenix’s Republican-heavy western suburbs. Franks’s replacement, whether Republican or Democrat, will be a woman.

Debbie Lesko is seeking the Republican nomination in Arizona’s 8th Congressional District. She faces a rival’s accusation that she illegally funneled money to a super PAC. Her campaign has threatened to sue for defamation. (Bob Christie/AP)

Until last week, local Republicans saw a tight race shaping up between Monte­negro and Lesko, both conservative lawmakers who left their state Senate seats to run for Congress. Little public polling had been conducted in the race, but Monte­negro and Lesko had political bases in the district, strong fundraising, and big-name support — including former governor Jan Brewer for Lesko and former Maricopa County sheriff Joe Arpaio for Monte­negro.

But on Feb. 21, the Arizona Republic obtained text messages between Monte­negro and a female staff member, including a nude photo that the staff member had sent the married lawmaker. Monte­negro called the story “a despicable example of the tabloid trash that conservatives around this country have to deal with on a regular basis,” then told a conservative outlet that he “did not have any inappropriate relationships with this woman.”

Monte­negro largely disappeared from the campaign trail after that and tried to turn the focus on Lesko, accusing her of “illegally funneling money into her super PAC” when she directed $50,000 from her state campaign fund to a group supporting her congressional bid. Lesko’s campaign threatened to sue for defamation, and dared Monte­negro to deliver his proof to the Arizona Republic “in person” — a jab at his battle with the paper over the texting story.

The scandals and finger-pointing added uncertainty to a race that was far from settled. In the last public polling on the contest, Monte­negro and Lesko were tied for the lead, with former Trump state campaign chairman Phil Lovas in third, and former state corporation commissioner Bob Stump trailing. Monte­negro, Lesko, and Lovas had been strong supporters of Trump; Stump, a one-time Trump critic, said that he had come around.

In the Democratic primary, also held Tuesday, Tipirneni defeated LGBT rights activist Brianna Westbrook. Although just 37 percent of the district’s voters backed Hillary Clinton in the 2016 presidential election, Democrats suggested that the higher-than-usual number of mail-in ballots from Democrats —27,531 from Democrats, 53,891 from Republicans, the rest from independents — pointed to high base enthusiasm. No Democrat had challenged Franks since 2012.

“The numbers accurately reflect how tough this district is for Democrats, but that Democrats have the momentum at this stage,” said Jason Kimbrough, a strategist for Tipirneni. “There needs to be some conversations with independent voters once the Republicans settle their race.”

The general election for the 8th District seat will be held on April 24. Republicans, who have lost a string of local races and watched Sen. Doug Jones (D-Ala.) take advantage of scandal and division to win his race last year, were nervous that Monte­negro could win and give Democrats a chance of victory.

“It’s over if he wins,” said Rep. Ruben Gallego (D-Ariz.) of Monte­negro, a few hours before the polls closed. “But no one’s going to put resources into the race either way. In November, the Republican was going to win it.”

Democrats got more promising news on the east coast on Tuesday night, as their candidates won Republican-held seats for the state legislature in both New Hampshire and Connecticut — the 38th and 39th seats captured by Democrats since the start of the Trump presidency.