Melanie Stansbury, a Democrat, won a special House election in New Mexico on Tuesday, claiming the seat previously held by Interior Secretary Deb Haaland and turning back a Republican effort to make the race a referendum on rising crime in the Albuquerque-based district.
As of 10:05 p.m. Eastern, Ms. Stansbury, a state representative, captured 63 percent of the vote, while her Republican rival, Mark Moores, was taking 33 percent.
An environmental policy expert who has worked as a congressional and White House aide, Ms. Stansbury emphasized economic fairness, the urgency of addressing climate change and the importance of Democrats’ retaining their four-seat House majority.
Mr. Moores, a state senator, ran almost entirely on crime and related issues. He assailed Ms. Stansbury for endorsing a bill in Congress that would shift money away from police departments, noting that there have been twice as many murders in Albuquerque this year as there were at this point in 2020.
Ms. Stansbury’s victory illustrates that the crime issue alone is insufficient for Republicans to win on in Democratic-leaning districts, at least when their candidates receive little financial help from the national party, as was the case with Mr. Moores.
Special elections in the first year after a president is newly elected can often carry grim tidings for the party in control of the White House. And with few such contests this year taking place on even remotely competitive terrain, Democrats moved aggressively to ensure that they were not caught by surprise in New Mexico.
Ms. Stansbury enjoyed a commanding financial advantage while benefiting from the Democratic tilt of the district, the First Congressional, which President Biden carried by 23 percentage points last year.
She also moved to rebut Mr. Moores’s line of attack, broadcasting a commercial that featured a retired sheriff’s deputy and trumpeted her work in the Legislature bringing state dollars for law enforcement back to Albuquerque.
Washington-based Republicans, determining that the heavily urban seat was out of reach, did little to help Mr. Moores. Conversely, national Democrats flooded Ms. Stansbury with assistance.
Guarding their thin House majority and fearing the political echo of a loss, or narrow victory, in a race centered on law and order, Washington Democrats dispatched Jill Biden, the first lady, and Doug Emhoff, the second gentleman, to appear with Ms. Stansbury in Albuquerque.
House Democrats and their allies in the nation’s capital also showered their nominee in New Mexico with an infusion of money in the final weeks of the race, enabling her to overwhelm Mr. Moores on the television airwaves.
Ms. Stansbury raised nearly $1.2 million in the last reporting period, from April 1 to May 12, while Mr. Moores brought in just $344,000 in the same period.
Mr. Moores made little attempt to hide his frustration at the lack of national assistance, but congressional Republicans said it would have been a waste of resources to spend significant money in a district that has been held by a Democrat since 2009.
In dismissing the race, though, Republicans ceded an opportunity to test just how politically potent the crime issue may prove in the midterm elections next year. With violence dominating the daily headlines in the district, Mr. Moores sought to capitalize on Ms. Stansbury’s support for a little-known bill that would, among other provisions, cut funding to local police departments.
She declined to say she regretted supporting the bill, but she largely avoided discussing the subject on the stump, even as she aired the ad emphasizing her efforts to secure funding for law enforcement.
After House Democrats were shut out entirely from the runoff in a Republican-tilting special House election in Texas, the New Mexico results were welcome for the party.
Representative Sean Patrick Maloney of New York, the chairman of the caucus’s campaign arm, traveled to Albuquerque on Tuesday to join the celebration and to claim a share of credit for retaining Ms. Haaland’s seat.