In what one prominent political strategist said was a wake up call for the GOP, Republican Mark Pody narrowly defeated his Democratic challenger to win a special election Tuesday to fill Tennessee's District 17 Senate seat.

Mae Beavers resigned the seat to focus on her gubernatorial campaign, setting up the special election in a heavily Republican district that spans Wilson, Cannon, DeKalb, Smith, Clay and Macon counties.

Yet Pody, according to unofficial election returns, won by slightly more than 300 votes. Pody, a state representative, had 5,990 total votes with Democrat Mary Alice Carfi at 5,682 votes. There were 13 provisional ballots out, all in Wilson County, according to election officials.

Tuesday night on Twitter, Republican strategist Ward Baker said the results show the need to "wake up and engage the voter base."

"Tonight's near-loss of a heavy R seat in Tennessee's #SD17 proves that we can't rely on 2006 tactics," Baker wrote. "2018 means data-driven, digitally-focused campaigns."

"Tonight's special election in Tennessee should be a clear example of why we can’t take anything for granted," Baker added.

Pody won Wilson, Macon and Cannon counties; Carfi took Smith, DeKalb and Clay counties, according to totals submitted to the state.

Tuesday's results will be considered unofficial until results are certified, Adam Ghassemi, spokesman for Secretary of State Tre Hargett's office said.

Just over 11,600 peopled voted in the special election with just over 7,200 coming from Wilson County. Pody edged Carfi 3,641 votes to 3,561 votes in Wilson County, according to the state's unofficial numbers.

Pody acknowledged he didn't expect as close a race as it became, but said Carfi "worked hard and was well-organized" with a "grassroots campaign."

"It's a good thing when people get up and run, it gives people a choice and (brings forward) new ideas," Pody said.

Carfi, a Lebanon resident and Mt. Juliet attorney, ran as a first-time candidate for political office. Education, health care and increasing jobs that pay a living wage were the priorities Carfi stressed in her campaign.

"I think it shows that people are ready for a change," Carfi said. "I had a ton of volunteers who did a fantastic job and worked very hard."

Certification for the special election is expected to be complete before the General Assembly reconvenes Jan. 9, according to Ghassemi.

Pody, 61, of Lebanon, ran as the sitting District 46 state representative. Pody has expressed a conservative political philosophy similar to Beavers, who is also a Republican.

Pody’s campaign platform has included creating a more business-friendly environment with limited regulations, and raising the level of high paying jobs with investments in education and training.

"His strong, conservative message resonated with the people of District 17. I look forward to working with him to reduce taxes, keep our budget balanced and bring jobs to Tennessee," Lt. Gov. Randy McNally, R-Oak Ridge, said in a statement.

Pody also has advocated for Wilson County's Lawrence McKinney, a man who spent 31 years in prison before being cleared in 2009 on a rape and burglary conviction. Pody said he will continue to seek exoneration for McKinney, which would allow him to file for compensation with the Tennessee Board of Claims.

The District 17 Senate and District 46 state representative seats are both up for election again in November 2018.

Pody plans to run again for the full Senate term in 2018, he said. Carfi will discuss her political future with her family, she said.

Mary Mancini, the Chair of the Tennessee Democratic Party, praised Carfi's campaign in a the district that heavily turned out for President Donald Trump in November 2016.

"This was a grassroots campaign driven by volunteers who made over 29,000 door knocks and phone calls and had over 6,000 conversations with voters in the district," Mancini said in a statement "Mary Alice inspired people to get involved by leading with her values and fighting for Tennessee families. While we came up just short, we showed a tremendous improvement in a difficult district ..."

The Wilson County Commission will appoint a replacement for Pody's House seat, since Pody lives in Wilson County.

Reach Andy Humbles at ahumbles@tennessean.com or 615-726-5939 and on Twitter @AndyHumbles.