Republican state Rep. Matt Caldwell declared victory Tuesday night as he held a narrow advantage in the contest to succeed term-limited Agriculture Commissioner Adam Putnam.

Caldwell, a real estate appraiser from North Fort Myers, gave an acceptance speech from an election watch party, according to WGCU Public Media.

As of Wednesday morning, Caldwell led Democrat Nikki Fried by about 17,216 votes out of 7.98 million ballots cast, and Fried, a lawyer and lobbyist from Fort Lauderdale, had not conceded.

On Tuesday night, when he was sporting a larger lead, Caldwell told POLITICO Florida that he wasn’t expecting the race to fall within the threshold for a recount.

“At this point we don’t see a scenario where that will change significantly,” he said. “We expect to be declared the winner.”

Florida law triggers a recount if the result of a race is within 0.5 percentage points. The current gap between Caldwell and Fried is 0.22 percentage points.

The campaign seemed to focus more on issues such as medical marijuana and guns than the agriculture aspects of the commissioner’s job, which includes serving on the state Cabinet and running the Department of Agriculture and Consumer Services.

With about $7.5 million spent by the candidates, the contest had the lowest spending among the three Cabinet races. But unlike the races for attorney general and chief financial officer, Caldwell and Fried discussed issues and participated in a debate that voters across the state could see.

Caldwell, 37, a graduate of Florida Gulf Coast University, was first elected to the House in 2010 and traces his family back seven generations in Florida. In the House, Caldwell has been a go-to lawmaker on a number of environmental issues for GOP leaders.

If his lead in Tuesday’s election holds, he will take over the sprawling Department of Agriculture and Consumer Services, which assists farmers and ranchers, manages public lands, maintains the state’s “do-not-call” list, inspects amusement park rides, ensures food safety and oversees concealed-weapons licenses.

A couple of key agriculture issues before the agency are citrus greening and the decline of the citrus industry, while also overseeing fruit imports at ports.

During the campaign, Caldwell sought to appeal to conservative voters with a pro-gun and anti-tax record in the Legislature while stressing his family’s roots in Florida and ties to the agriculture industry. He considers “jobs and water” the priorities of the office.

Caldwell, endorsed by the NRA, defended the department’s handling of concealed-weapons licenses under Putnam after a number of mistakes were found in conducting national background checks. Fried said a discussion is needed on moving the licensing process to the Florida Department of Law Enforcement.

And with the state experiencing problems with toxic algae and red tide, Fried contended water legislation by Caldwell “gutted” Department of Environmental Protection regulations and played a crucial role in degrading the state’s environment.

Caldwell countered that his measures require farmers to implement “the most cutting-edge technology” related to the use of phosphates and didn’t roll back any water quality standards.

Fried, 40, stressed the consumer protection side of the agency and appealed to progressives by focusing on expanding medical marijuana and the hemp industry.

Fried said running a Cabinet agency is more about providing leadership and judgment and who can advocate for the office than having worked in the fields.

Fried, who spent $2 million to the $5.5 million spent by Caldwell, drew some attention to the contest by announcing that two national banks — Wells Fargo and BB&T — terminated her campaign account because of contributions tied to the marijuana industry. The banking industry has cited federal laws that make the sale and use of marijuana illegal.