Story highlights Rep. Bob Goodlatte served nearly 25 years in the House of Representatives

More than two dozen House Republicans have said they'll step down

(CNN) Virginia Republican Rep. Bob Goodlatte, the chairman of the House judiciary committee, announced he won't run for re-election on Thursday, just two days after the stunning defeat by GOP candidates in statewide and local contests his home state.

In a written statement, Goodlatte said he and his wife discussed the 2018 midterm election and his time as chairman coming to an end next year was a factor.

"After much contemplation and prayer, we decided it was the right time for me to step aside and let someone else serve the Sixth District," Goodlatte wrote. "I will not seek re-election. With my time as Chairman of the Judiciary Committee ending in December 2018, this is a natural stepping-off point and an opportunity to begin a new chapter of my career and spend more time with my family, particularly my granddaughters."

Goodlatte served nearly 25 years in the House of Representatives, and in addition to his current post as head of a key committee, he also chaired the agriculture panel, an important post to the farming community in his mostly rural district.

Read More