Maggie Toulouse Oliver, the Bernalillo County Clerk, defeated a state representative to capture the Secretary of State’s seat two years after she lost an election for the same office.

Toulouse Oliver, a Democrat, earned about 58 percent of the unofficial election night vote, picking up strong support from her home county as well as in Santa Fe, Rio Arriba, San Miguel and other points north. Her opponent, Republican Nora Espinoza, a state legislator from Roswell who gave up her House seat to seek statewide office, did well in her hometown and swaths of oil and gas country.

As New Mexico's Secretary of State, Toulouse Oliver will be administering elections, maintaining business records and performing the duties of the governor when she and her lieutenant are out of state.

"Now we begin the work of ensuring integrity and accountability in the Secretary's office and throughout government in New Mexico," Toulouse Oliver writes in a statement issued as she worked to oversee the ballot-counting process in Albuquerque.

Toulouse Oliver promised to make elections more accessible and to strictly enforce campaign finance laws. New Mexico's last elected secretary of state, Dianna Duran, served time at the Santa Fe County lockup after pleading guilty to corruption and embezzlement. Prosecutors found that Duran illegally used campaign funds to fuel a gambling spree.

While the secretary of state usually serves four-year terms before facing re-election, Duran's resignation in 2015 prompted a special race this cycle.

The candidates disagreed starkly on whether New Mexicans should be required to present photo ID when voting. Espinoza, who ran a campaign centered on the issue, portrayed voter fraud as a problem that such laws would prevent, despite scant evidence that the crime occurs on a widespread basis.

Toulouse Oliver opposes voter ID laws, claiming they would disproportionately impact elderly and low-income voters. At the same time, she supports changes to that would ostensibly increase access to the ballot box. She touts policies like allowing all New Mexican citizens to register to vote online and automatically registering voters who apply for a driver's license.

Donors poured hundreds of thousands of dollars into the race, this year's highest-level statewide contest. Toulouse Oliver raised more than twice as much as her opponent, bringing in more than $700,000.

The race sometimes descended into ugliness. Both candidates' parties filed ethics complaints over the opposition's donor reporting, though neither maneuver stuck. In the last few weeks of the election season, Espinoza aired a misleading ad claiming that her opponent once allowed a dog to register to vote. (Toulouse Oliver investigated and struck the canine from the rolls.) The Democrat, for her part, ran television ads tying Espinoza to Donald Trump, the Republican presidential candidate.