Oklahoma Lt. Gov. Jari Askins narrowly defeated state Attorney General Drew Edmondson in Tuesday’s Democratic primary for governor.

Askins won 50.3 percent of the vote to Edmondson’s 49.7 percent. The gap between the two was less than 3,000 votes.

Edmondson, who trailed in early returns, narrowed the gap with Askins as the night wore on, but eventually conceded victory to Askins despite the razor-thin margin.

The Democratic primary contest was close for weeks. Both candidates decided to forgo running for reelection to their respective statewide offices for a shot at the governor’s office.

Edmondson led heading into Election Day both in the polls and in campaign dollars. He raised more cash than any gubernatorial candidate in either party, banking $2.6 million over the course of his campaign.

In the race’s final week, Askins lent her campaign a hefty $675,000. But even with that cash included, she was only able to manage $1.1 million over the course of the race.

She did, however, receive a last-minute boost from former University of Oklahoma football coach Barry Switzer, who endorsed her last week. Switzer is a wildly popular figure in the state, and statewide candidates have sought his backing in the past.

Switzer’s endorsement provided a last-minute boost for Gov. Brad Henry during his first run in 2002.

The primary victory for Askins ensures that the state will elect its first female governor this fall. Askins will face Rep. Mary Fallin (R) in November.