WASHINGTON — Ben Carson, the nominee for secretary of housing and urban development, presented himself on Thursday as a credible manager for a sprawling federal bureaucracy, navigating an unlikely transition from celebrated neurosurgeon and genial conservative presidential candidate to the steward of American housing policy.
At a Senate confirmation hearing, Mr. Carson, 65, strained at times to square his past remarks on the dangers of federal assistance — he once called poverty “really more of a choice than anything else” — with the mission of the Department of Housing and Urban Development, an agency with a $47 billion budget and a mandate to help millions of low-income renters and struggling homeowners.
Forgoing many specifics, he laid out a vision of a more “holistic” approach: recruiting private sector dollars and seeking to end what he called a cycle of “generation after generation of people living in dependent situations.”
The podcast that makes sense of the most delirious stretch of the 2016 campaign.
“Safety net programs are important. I would never advocate abolishing them without having an alternative for people to follow,” he said, adding that “some have distorted what I’ve said about government.”
Yet Americans had come to view HUD’s mission as “putting roofs over the heads of poor people,” Mr. Carson said. “It has the ability to be so much more than that.”
As with his presidential campaign, Mr. Carson leaned heavily on his own compelling biography, straying frequently from his prepared opening remarks as he spoke of life in an impoverished section of Detroit as the son of a single mother with a third-grade education.
He waded through several contentious moments, including some aimed at his prospective boss, President-elect Donald J. Trump, and the specter of conflicts over HUD funding and Trump family business ventures.
But Mr. Carson, who was prone to fits of spaciness and occasionally bewildering remarks as a candidate, appeared to avoid any major slips on Thursday.
The tone of the proceedings diverged sharply from that of hearings this week for Rex W. Tillerson, Mr. Trump’s choice for secretary of state, and Senator Jeff Sessions, Republican of Alabama and the selection for attorney general. Both men faced aggressive questioning from Democrats — and, in Mr. Tillerson’s case, from a Republican, Senator Marco Rubio of Florida.
On Thursday, Mr. Rubio introduced Mr. Carson as a leader with “the values, the compassion and the character and the kind of drive that we need.” Senators from both parties made warm reference to Mr. Carson’s granddaughter in attendance, who wore pink headphones during the testimony. They thanked him for his career in medicine.
Even some of the more pointed questioners, like Senator Sherrod Brown of Ohio, the ranking Democrat on the Committee on Banking, Housing and Urban Affairs, were disarmed.
“You remind me of Columbo,” Mr. Carson said at one point, to extended laughs.
“I’ve actually heard that before,” Mr. Brown said.
Still, there were sharp exchanges.
Senator Elizabeth Warren, Democrat of Massachusetts, sought to pin Mr. Carson down on a simple question: “Can you assure me that not a single taxpayer dollar that you give out will financially benefit the president-elect or his family?”
Mr. Carson said he would be driven by morals. Ms. Warren cut him off, saying her specific concern was whether grants and loans could specifically benefit Mr. Trump.
“It will not be my intention to do anything to benefit any American,” Mr. Carson said, becoming flustered for a moment before quickly clarifying that he wanted to use the department to help “all Americans.”
Ms. Warren called on Mr. Trump to establish a blind trust, accusing him of “hiding” his assets.
Mr. Carson would not commit definitively to avoiding Trump businesses if confirmed. “If there happens to be an extraordinarily good program that’s working for millions of people and it turns out that someone that you’re targeting is going to gain $10 from it, am I going to say no?” Mr. Carson said.
Later, he agreed to work with Mr. Brown to construct a system to identify properties tied both to the Trump family and the department. He committed to telling senators about the department’s dealings with any businesses owned by Mr. Trump or his relatives.
More often, Mr. Carson sat patiently as lawmakers recited some of the most fraught comments of his public life.
In one interaction, Senator Bob Menendez, Democrat of New Jersey, asked if Mr. Carson truly believed in HUD’s mission, given his trail of comments railing against government intervention.
“I think the rental assistance program is essential,” Mr. Carson said, when pressed twice, “and what I have said if you’ve been reading my writings: It is cruel and unusual punishment to withdraw those programs before you provide an alternative.”
When asked about housing protections for lesbian, gay, bisexual and transgender citizens, Mr. Carson, a vocal opponent of same-sex marriage, said he would “enforce all the laws of the land” if confirmed. But he expressed his personal opposition to any expression of what he called “extra rights” for certain groups.
For Republicans, the hearing supplied an opportunity to pay tribute to a figure revered by the conservative base.
Senator Thom Tillis, Republican of North Carolina, asked Mr. Carson what he thought was “the best possible thing we can do for someone on government assistance.”
“Get them off it,” Mr. Carson said.