Rep. Charlie Dent, R-Pa., revealed he will not run for office again in the 2018 midterm elections, shortly after state Rep. Justin Simmons announced he would challenge Dent in the primary.

Dent, a moderate Republican, said he decided against running for re-election after consulting with his family, close friends, and senior staffers.

"Regrettably, that has not been easy given the disruptive outside influences that profit from increased polarization and ideological rigidity that leads to dysfunction, disorder and chaos," Dent said in a statement Thursday. "But I have also had a stake in major legislative accomplishments: budget agreements that prioritize our federal commitments, pro-growth trade and tax policy, initiatives to advance medical innovation and research, major infrastructure investments, and policies that secure our homeland."

In response to Dent's announcement, the National Republican Congressional Committee said Dent will be missed.

"From reforming the broken VA to ensuring every child has access to a high-quality education, Congressman Dent has championed conservative values since taking office in 2005," said NRCC Chairman Steve Stivers.

"While his leadership in Congress will be sorely missed, I wish him the very best in the next chapter of his life. Voters sent a clear message by delivering the district for President Trump last November -- and we are confident that PA-15 will remain solidly under Republican control," he added.

"We wanted to make sure we got a more conservative candidate in the seat and now we can do that." — Kyle Cheney (@kyledcheney) September 7, 2017

According to Kyle Cheney from Politico, Simmons said it was unexpected that Dent won't seek office again, adding that a more conservative candidate can replace Dent.

Dent has been a critic of President Trump. He condemned Trump for his travel ban from predominantly Muslim countries, firing former FBI director James Comey while he was investigating the administration for ties to Russia, and remarks made about violence existing on "both sides" in Charlottesville, among other things, according to the Morning Call.

Dent also voted against the House GOP plan to repeal Obamacare, which irritated some conservatives. Two conservative groups organized rallies in his district calling on him to either support Trump or remove himself from the Republican Party.