Republican Ron Estes won a seat in Kansas’ 4th District on Tuesday that was vacated when President Donald Trump appointed Rep. Mike Pompeo to serve as director of the Central Intelligence Agency.

Estes will takes the seat Pompeo held in the House of Representatives since 2011 before joining the CIA in January.

Estes, Kansas’ state treasurer, ran against Democrat James Thompson, a U.S. Army veteran and civil rights attorney, and Chris Rockhold, a Libertarian and flight instructor for FlightSafety.

Estes won a narrow victory with 53.3 percent of the vote while Thompson came away with 45 percent of the vote with 99 percent of the precincts reporting, The New York Times reports.

Gov. Sam Brownback, R-Kan., congratulated Estes on his win.

“Congratulations to Ron Estes,” Melika Willoughby, Brownback’s communications director, said in a statement to The Daily Signal.

“With this victory, the Kansas Republican party is now 32-0 in federal and statewide elections since first nominating Sam Brownback for governor,” Willoughby said.

Kansas voted for Trump overwhelmingly in November with 56.2 percent of the vote while Democrat nominee Hillary Clinton took 35.7 percent of the vote, according to The New York Times. Trump earned 60 percent of the vote in Wichita, ABC News reports.

Rachel Bovard, director of policy services at The Heritage Foundation and a former Senate aide, said the narrowness of the race between Estes and Thompson is a warning to the Republican Party.

“I think the closeness of this race is a warning to the GOP,” Bovard told The Daily Signal in an email. “Trump won this district by almost 30 points, and Pompeo never won less than 60 percent of the vote.”

The tightness of the race, Bovard said, should serve as a message to Congress as midterm elections in 2018 approach.

To have a House race this close in a safe GOP district within the first 100 days is troubling. It means those voters who were so motivated to get out and vote for Trump are waning in enthusiasm, either for Trump or for Congress, or both. The GOP should be watching closely and understand that this is a dynamic that could easily play out in the 2018 midterms if they don’t start keeping the promises they ran on.

Thompson, the Democrat, ran on a platform that included calls for education reform, “fair immigration policies,” and LGBT rights.

“I am running for Congress because I want to make sure that I am protecting the things that are important in the country,” Thompson said in a campaign ad. “Protecting our families, protecting our ability to work, protecting our education, and protecting our freedoms.”

Thompson also said he will “fight against all forms of discrimination, and vigorously oppose those who would attack and bully members of the LGBT community.”

Estes has served as Kansas’ 39th state treasurer since 2011 and manages “an office that currently handles over $24 billion and an annual operating budget of $3.5 million.”

The Kansas state treasurer ran on a platform that included support for economic growth, a balanced budget, and strict adherence to the Constitution.

Estes also says he supports repealing and replacing Obamacare.

“Obamacare must be repealed,” Estes said on his website. “Families and individuals in the 4th District should be the primary voice in making their health care decisions, not unelected Washington bureaucrats. I support replacing Obamacare with a state-based free market solution that gives each of us greater authority over our health care decisions.”

Trump and Sen. Ted Cruz, R-Texas, both supported efforts for Estes.

Trump tweeted his support for Estes Tuesday morning and recorded a robocall for Estes, telling voters that “Ron is a conservative leader who’s going to work with me to make America great again.”

Ron Estes is running TODAY for Congress in the Great State of Kansas. A wonderful guy, I need his help on Healthcare & Tax Cuts (Reform). — Donald J. Trump (@realDonaldTrump) April 11, 2017

Cruz campaigned for Estes Monday in Wichita, telling crowds that “Today the eyes of the whole country are on Kansas,” The Wichita Eagle reported.

Today, the eyes of the whole country are on Kansas! #KS04 https://t.co/aKgFilMd6x — Ted Cruz (@tedcruz) April 10, 2017

Cruz told voters their support of Estes was critical to advancing an Obamacare repeal and replacement package, getting rid of government regulations, and tax reform, The Wichita Eagle reported.

Tim Huelskamp, a Republican congressman who served Kansas’ 1st Congressional District from 2011-2017 credited Cruz for his support and influence in Estes’ win.

“Ron Estes has many people to thank for his narrow victory,” Huelskamp said. “But Sen. Ted Cruz has to be at the top of the list. Unlike the rest of Washington, Cruz was willing to stick his neck out and actually work to keep this seat in Republican hands.”

Eric Teetsel, president and executive director of the Family Policy Alliance of Kansas, told The Daily Signal in an email that Estes enters Congress with a mandate from the American people.

“Ron Estes will enter Congress with a mandate to get things done,” Teetsel said. “He won because he promised to repeal and replace Obamacare, defund Planned Parenthood, and reduce the size and scope of government while maximizing liberty and opportunity.”

Voters in the 4th District, Teetsel said, “expect the Republican Party majorities in Congress and Republican president to follow through.”