WASHINGTON — President-elect Donald Trump said Tuesday he is considering naming Dr. Ben Carson to lead the Department of Housing and Urban Development, a departure from speculation that the retired Johns Hopkins neurosurgeon would fit best in a health policy job.

“I am seriously considering Dr. Ben Carson as the head of HUD,” Trump said in a tweet Tuesday. “I've gotten to know him well — he's a greatly talented person who loves people!”

Later Tuesday, the Associated Press reported that Trump had formally offered Carson the job, and Carson would think about it over Thanksgiving. The AP cited a person familiar with the offer speaking on condition of anonymity because the person was not authorized to discuss the deliberations publicly.

It was the latest twist in an unusual alliance between two men who once questioned each other's faith on the campaign trail. As recently as last week, Carson sounded disinclined to take any job in Trump's Cabinet, saying his preference would be to serve as an outside adviser.

Before that, there had been considerable speculation Carson might head the Department of Health and Human Services or the Department of Education. Both departments could face upheaval in the transition from President Barack Obama to Trump.

Carson, who lived in Baltimore County for years before retiring from Hopkins and moving to Florida, said he was qualified to lead the housing department in part because he grew up in Detroit and practiced medicine in Baltimore.

“Our inner cities are in terrible shape, and they definitely need some real attention,” Carson told Fox News on Tuesday. “I grew up in the inner city and have spent a lot of time there, and have dealt with a lot of patients from that area. And I recognize that we cannot have a strong nation if we have weak inner cities.”

Carson said he would be “thinking and praying” about the job.

It is unusual for a president-elect to float the names of candidates under consideration for Cabinet posts because it can harm their careers if they are not ultimately selected.

Carson, 65, briefly led polls in the Republican primary last year but suspended his presidential campaign in March following a fifth-place finish on Super Tuesday and disappointing results in other early states.

A renowned pediatric neurosurgeon at Hopkins, Carson captured national attention in 2013 with a speech at the annual National Prayer Breakfast in Washington. The speech was notable because Carson criticized the policies of President Barack Obama in his presence.

Two years later, he entered the race for the Republican nomination, arguing that the nation needed an outside voice to fix national politics.

The relationship between Trump and Carson was contentious during the primary. Trump often described Carson as “low-energy,” and once compared him to a child molester. At one point, the two questioned each other's religious faith.

john.fritze@baltsun.com

twitter.com/jfritze