Alabama state Rep. Robert Bentley won the Republican nomination for governor Tuesday, defeating Bradley Byrne in a runoff.

The Associated Press called the race with Bentley leading Byrne 57 percent to 43.

Bentley, who finished a close second in the June 1 primary, played the role of outsider to Byrne’s status as the pick of the state’s GOP establishment. In June, Byrne won 28 percent of the vote to Bentley’s 26 in a multi-candidate primary. 

The runoff was marked by negative ads from outside interests. The Alabama Education Association spent more than $2 million running ads against Byrne. The group encouraged Democrats to come out and vote against Byrne in the runoff.

The GOP establishment in the state, led by Sen. Jeff Sessions and Rep. Spencer Bachus, was firmly behind Byrne.

Given the expected low voter turnout, some Byrne backers were wary that crossover voting from Democrats would help Bentley.

Bentley will face state Agriculture Commissioner Ron Sparks (D) in November’s general election.