Republican lawyer and University of Missouri associate law professor Josh Hawley has been elected as the state's next attorney general.

The first-time candidate won Tuesday's general election. He beat out Democratic candidate Teresa Hensley, a former county prosecutor, in the race for the state's top law enforcement seat.

Hawley went on a leave of absence from the University of Missouri to campaign. He'll replace Democratic Attorney General Chris Koster when he leaves office in January.

Hawley touted himself as a political outsider during his campaign.

As a private attorney, he worked with about 15 lawyers in the U.S. Supreme Court case in which Hobby Lobby and other businesses challenged a federal requirement to provide insurance coverage for contraceptives for employees.