President-elect Donald Trump says he's "seriously considering" Dr. Ben Carson for housing secretary.

In a tweet on Tuesday afternoon, Trump called Carson, a retired neurosurgeon and former rival for the Republican presidential nomination, "a greatly talented person who loves people!"

The secretary of housing and urban development oversees federal public housing programs and helps formulate policy on homelessness and housing discrimination. If nominated, Carson would have to be confirmed by the Senate.

'Unprecedented': On the trail with Ben Carson

Armstrong Williams, a Carson adviser, told CNN on Tuesday that Carson is "honored that the president-elect insists that he take a cabinet role in his administration" and that he is "considering" it.

Still, Williams said Carson has "made it clear" he would prefer to continue advising Trump from outside the administration.

Williams said last week that Carson declined Trump's offer to head up the Department of Health and Human Services in part because running a federal agency would be "a lot to ask" of a "neophyte" like Carson who has never before worked in government.

"He also said and was very clear that if the president-elect insisted and felt he could found no one else, then he would seriously consider a position in the administration," Williams told CNN on Tuesday.

I am seriously considering Dr. Ben Carson as the head of HUD. I've gotten to know him well--he's a greatly talented person who loves people! — Donald J. Trump (@realDonaldTrump) November 22, 2016

The job of housing secretary became even more important after the 2008 housing crisis. President Obama's first pick for the job, Shaun Donovan, oversaw the nearly $14 billion HUD received from the American Recovery and Reinvestment Act, known as the stimulus.

Related: Trump down to two choices for Treasury secretary

Donovan left the job in 2014 and was replaced by Julian Castro, then mayor of San Antonio.

The housing secretary also oversees programs that administer mortgage insurance to prospective homeowners and give rental subsidies to lower-income families.

Carson enjoyed an early surge in the polls after he announced for president in May 2015. He ran mostly on his biography rather than policy. He bowed out of the race after a disappointing finish on Super Tuesday.

He portrayed himself as a troubled youth who overcame adversity to become a talented surgeon, and said he once tried to stab someone when he as 14. A CNN report raised questions about Carson's claims that he was angry and violent as a teenager.

Trump, meanwhile, derided him as "super low energy."

Carson's campaign was punctuated by strange claims, including that the Egyptian pyramids were used to store grain.

"The pyramids were made in a way that they had hermetically sealed compartments," he said. "You wouldn't need hermetically sealed compartments for a sepulcher. You would need that if you were trying to preserve grain for a long period of time."

--CNN's Jeremy Diamond and Eugene Scott contributed to this report.