Former House Speaker Kevin McCarthy is resigning from Congress and will leave at the end of this year, he announced in a Wall Street Journal op-ed on Wednesday — a highly anticipated decision that comes two months after his unprecedented ouster from the speakership.

McCarthy’s decision will narrow the House GOP’s already historically slim majority, which just last week got smaller after the expulsion of ex-Rep. George Santos of New York. How much room Republicans have to work with next year will depend on the outcome of a handful of special elections in 2024.

McCarthy, who has been in office for 17 years and spent much of it at the leadership table, touted his accomplishments in the op-ed and made clear he has no regrets about his tenure. McCarthy, who battled through 15 grueling rounds to win the speaker’s gavel in January, was removed just nine months later after infuriating his right flank for putting a stopgap spending bill on the floor with the support of Democrats.