(CNN) Texas Republican Rep. Will Hurd -- a frequent critic of President Donald Trump who represents one of the most competitive districts in the country -- will not seek reelection, he announced Thursday.

"I have made the decision to not seek reelection for the 23rd Congressional District of Texas in order to pursue opportunities outside the halls of Congress to solve problems at the nexus between technology and national security," he tweeted Thursday.

The former CIA agent referenced China's geopolitical threat, international competition in artificial intelligence and cybersecurity, and instability in Central America as issues he hoped to address outside of Congress, citing the role of "the private sector and civil society."

Hurd, the only black House Republican, promised to remain "involved in politics to help make sure the Republican Party looks like America," after having "taken a conservative message to places that don't often hear it."

Hurd is the eighth Republican representative who has decided to leave Congress instead of running again in 2020. The three-term congressman, who represents the largest stretch of US-Mexico border of any congressional district, won his district in 2018 by less than 1 percentage point . The district had switched parties the previous two terms before his election in 2015.

Behind the scenes, Republicans lamented Hurd's announcement. One senior GOP aide said the announcement from Rep. Will Hurd was "not good news" for the party heading into 2020. A separate GOP strategist said Hurd's departure is a "huge loss," adding the district will "likely fall into Dem hands." One senior House Republican lawmaker told CNN Hurd's decision is a "gut punch."

Hurd previously condemned Trump's rhetoric as out of line and a deterrent to diversifying the Republican Party.

"Look, I'm the only black Republican in the House of Representatives. I go into communities that most Republicans don't show up in order to take a conservative message," Hurd said. "This makes it harder in order to take our ideas, and our platform, to communities that don't necessarily identify with the Republican Party."

Hurd was also a staunch opponent to a border wall, spearheading bipartisan legislation that supported border security but focused more on technology and strategy than a wall.

"The $32 billion that would go into a border wall, I'm just even more convinced that it would be better spent with some of these existing programs, and we'd see a quicker decrease in drugs and illegal immigration," Hurd said, referring to US initiatives to help Central America.

The moderate Republican also slammed separating asylum-seeking families as a "terrible idea" and cutting aid to Central America as counterproductive to "addressing the root causes of illegal immigration."

Hurd made headlines in 2017 with 2020 Democratic presidential candidate Beto O'Rourke , then a fellow congressman, when flight cancellations prompted the two to road-trip back to Washington together.

This story has been updated with additional developments Friday.