Republican Rep. Trey Gowdy, chairman of the House Oversight Committee, said Wednesday he will not seek re-election — the 34th GOP House member to head for the exit before the 2018 midterm elections.

“There is a time to come and a time to go. This is the right time, for me, to leave politics and return to the justice system,” the South Carolina lawmaker said on Twitter.

“Whatever skills I may have are better utilized in a courtroom than in Congress, and I enjoy our justice system more than our political system. As I look back on my career, it is the jobs that both seek and reward fairness that are most rewarding,” Gowdy, a former federal prosecutor, said in the statement.

Gowdy, 53, becomes the 10th committee chairman to call it quits before the midterms.

His retirement comes just two days after Rep. Rodney Frelinghuysen, a Republican from New Jersey, announced he would not seek re-election on Monday.

“Public service is an incredible way to turn your convictions into something that serves the greater good and to do it alongside people from every walk of life and background, ” said Frelinghuysen, chair of the House Appropriations Committee.

But while Frelinghuysen represents an area in northern New Jersey that Donald Trump won in 2016 by 1 percentage point and is expected to be competitive, Gowdy’s seat is safely Republican.

Trump won the district by a 25-point margin.

Shortly after Gowdy’s announcement, Democratic Rep. Bob Brady of Pennsylvania said he would also be stepping down, according to WPVI-TV in Philadelphia.

Brady, who was first elected to the House in 1998, joins 15 other House Democrats opting not to seek re-election this year.

The wave of retirements comes as the filing deadline for candidates to declare their intentions approaches.

Gowdy, first elected in 2010, referred to that looming date in his statement.

“There is no perfect time to make this announcement, but with filing opening in six weeks, it is important to give the women and men in South Carolina who might be interested in serving ample time to reflect on the decision,” he said.

He rose to prominence as chairman of the House committee investigating the September 2012 attack on a US diplomatic outpost in Benghazi, Libya, and then-Secretary of State Hillary Clinton’s response.

Four Americans died in the assault, including Ambassador Christopher Stevens.