RALEIGH, N.C. (WNCN) — Former North Carolina Gov. Pat McCrory announced Thursday — just two days after he lost the Republican primary Senate race — that he has COVID-19.

McCrory served as North Carolina’s governor from 2013 to 2017, losing to current Gov. Roy Cooper by just more than 10,000 votes in the 2016 election.

McCrory said in a tweet Thursday that he was diagnosed with COVID-19 on Wednesday.

Here is the full text from McCrory’s tweet about contracting COVID-19:

“Thanks for so many kind notes from friends and supporters since Tuesday. Have not been as responsive because I got diagnosed with Covid yesterday. It’s no fun! I love u all. Appreciate all your prayers for Ann and me. God bless.”

McCrory lost the Republican primary Tuesday night to Ted Budd, who was endorsed by former President Donald Trump.

Before running for governor, McCrory was the mayor of Charlotte from 1995 to 2009.

A super PAC affiliated with the conservative Club for Growth spent millions on ads supporting Budd and attacking his chief rival, former McCrory, as too liberal.

WFAE radio in Charlotte reported that McCrory said his political career is over while he was at a gathering with supporters on Election Night.

The Associated Press contributed to this report.