Congressman Will Hurd, the only black Republican in the House and one of the last remaining members of his party in Congress critical of Donald Trump, will not seek re-election in 2020.

Hurd joins a wave of Republican retirements in recent weeks, and his departure deals another blow to the party’s effort to retake control of the House in next year’s election. The Texas lawmaker was among the most vulnerable Republicans in Congress after barely holding on to his seat in 2018, when Democrats won the House majority.

“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 wrote in a statement posted on Twitter.

His statement concluded with a warning, suggesting the country was at a crossroads.

“Two centuries ago, I would have been counted as three-fifths of a person, and today I can say I’ve had the honor of serving three terms in Congress,” he wrote. “America has come a long way and we still have more to do in our pursuit of a more perfect union. However, this pursuit will stall if we don’t all do our part.”

Hurd, a former CIA officer, was a frequent critic of Trump’s attacks on the US intelligence services, his dismissal of Russian interference and his approach to immigration. Most recently, the Texas Republican criticized the president over his remarks about four congresswomen of color.

He was one of just four Republicans who voted for a House resolution to condemn Trump’s suggesting that the congresswomen Ilhan Omar, Alexandria Ocasio-Cortez, Ayanna Pressley and Rashida Tlaib should “go back” to their home countries, even though three of them were born here and all are US citizens.

After the Republicans’ eight years in the House majority ended with the 2018 election, several veteran Republicans have announced their retirement, including the Texas congressman Mike Conaway, the top Republican on the House agriculture committee; the Alabama congresswoman Martha Roby, one of just 13 Republican women in the House; and the Utah congressman Rob Bishop, the ranking member on the natural resources committee.

Several of the retirements are in ruby-red conservative districts that Republicans will almost certainly keep. But others, like the border district Hurd represents and the suburban Houston district that the retiring congressman Pete Olson represent, offer potential opportunities for Democrats in Texas, where the party has become more competitive amid demographic changes and a backlash against Trump.

Hurd’s district, which spans 820 miles along the US border and is majority Hispanic, was already competitive, and his decision not to seek re-election throws the race to replace him wide open. Gina Ortiz Jones, a veteran and political newcomer who came close to defeating Hurd in 2018, is running again for the seat, with Democrats vowing to do everything to help push her over the line this time around.

“Democrats will win this seat, and if Will Hurd doesn’t believe he can keep his job in a changing Texas, his colleagues must be having second thoughts, too,” said Avery Jaffe, a spokesman for the Democratic Congressional Campaign Committee.

But Republicans vowed to fight to keep the seat. It was unclear if Republicans had a candidate in mind for the district.

Congressman Tom Emmer, the chair of the National Republican Congressional Committee, which helps to elect House Republicans, said: “Contrary to what the pundits will tell you, this is an R+1 district and we will fight tooth and nail to ensure it remains in Republican hands in 2020.”

Hurd did not say what he plans to do next, but he hinted at a job in the private sector “at the nexus between technology and national security”.

“I’ve taken a conservative message to places that don’t often hear it,” he wrote on Twitter. “I’m going to say involved in politics to help make sure the Republican Party looks like America.”