Rob Sand’s big investment paid off: The Democratic former assistant attorney general defeated incumbent Mary Mosiman in Iowa’s state auditor race.

Sand received 51 percent of the vote to Mosiman's 47 percent with all 99 counties reporting. Libertarian Fred Perryman received 3 percent of the vote.

► Election results for Iowa governor, U.S. House, State Senate, State House

► Election Day 2018: Results, stories and more coverage from the Register

"Iowa, we're going to wake up the watchdog," Sand said in his victory speech Tuesday night.

Sand raised more than $402,070 in cash contributions in the final stretch, according to his most recent campaign finance disclosure. In comparison, Mosiman raised $22,800.

The Democratic Party did more than invest money. U.S. Sen. Cory Booker of New Jersey sent a staffer to work Sand's campaign, U.S. Sen. Elizabeth Warren of Massachusetts sent fundraising emails on his behalf and Govs. Steve Bullock of Montana and Martin O'Malley of Maryland campaigned for Sand.

Sand was a Democrat favorite early because of his background with high-profile investigations during his time in the attorney general’s office, working on some corruption cases such as a notorious lottery scam case.

While he wasn't the only Democrat favorite in Iowa, he was the only one who wrested a statewide office Tuesday night from Republican control. Democrat candidate for governor Fred Hubbell and secretary of state candidate Deidre DeJear both lost.

Mosiman and many others publicly criticized Sand for not being a certified public accountant, which she argued was necessary for the auditor role. There are no legal requirements to possess a CPA license to hold the office.

Not all state auditors have held this license in the past, although it has been decades since a person holding the office didn't have it. But Mosiman said the office would have to pay for private accountants to conduct these types of audits and would rack up additional costs for taxpayers.

Sand disagreed with Mosiman's interpretation of the law.

"Whether or not the state auditor's office is a CPA firm is as important to the work they do as the fact that I am a certified expert bowhunter and my opponent is not," he said at a debate with Mosiman on Iowa Press TV.

Now that Sand is elected, the auditor’s office will have to figure out whether they have additional expenses because of his lack of CPA license.

Sand will officially take office Jan. 1, 2019.

► Subscribe to the Des Moines Register

► Follow the Register on FACEBOOK | TWITTER | INSTAGRAM | YOUTUBE

► Subscribe to our new politics newsletter at DesMoinesRegister.com/politicsnewsletter