WASHINGTON — A little-known counterterrorism official named Christopher C. Miller flew to the Middle East last month to pursue a diplomatic idea: asking Qatar to help devise plans to buy off or otherwise marginalize some senior leaders of the Shabab, Al Qaeda’s affiliate in Somalia, who are more committed to attacking the West.
Mr. Miller had obtained a blessing from Kash Patel, then a senior official at the National Security Council. President Trump’s national security adviser, Robert C. O’Brien, was also aware of the trip, officials said. But they bypassed the nation’s chief diplomat, Secretary of State Mike Pompeo — and when he found out, he deemed the idea half-baked and shut it down.
Now, control over American national security and foreign policy has been upended. Mr. Trump abruptly installed Mr. Miller as acting defense secretary this week — making him, at least on paper, Mr. Pompeo’s equal for the administration’s last two months. Mr. Patel is becoming Mr. Miller’s chief of staff.
The appointment capped a stunning rise for Mr. Miller, a former Green Beret officer who 11 months ago was a counterterrorism adviser at the National Security Council and who lacks significant experience managing a sprawling organization. The extraordinary power and responsibility he will wield during the uncertain endgame of the Trump administration — when Mr. Trump is refusing to acknowledge that he lost the election — immediately cast tremendous attention on the largely unknown new Pentagon leader.
Mr. Miller has displayed an irreverent demeanor that at times clashes with the grave policy matters he has handled, according to people who have worked with him. His background in the Army Special Forces dovetails with a reputation for being hard-charging and not always respectful of bureaucratic vetting procedures that are intended to ensure that potential consequences are fully considered before acting.
Mr. Miller’s previously unreported trip to Qatar offers insight into the acting secretary’s mind-set. The awkward shuttering of the effort was an embarrassing outcome for the U.S. government, in part because Qatar’s emir had already apparently given his approval to explore Mr. Miller’s proposal.
It could also portend the kind of last-ditch initiatives or operations, whether overt or covert, that Mr. Trump and his top aides might pursue during his last weeks in office.
“The policy process in this administration has just been so bizarre,” said Tricia Bacon, a Somalia specialist at American University in Washington and a former State Department counterterrorism analyst.
The officials familiar with Mr. Miller’s aborted venture described it on the condition of anonymity because of its sensitive diplomatic and intelligence nature. Spokesmen for the State Department, the National Security Council and Mr. Miller declined to comment.
Mr. Miller seemed an unlikely emissary for such a delicate diplomatic foray. He spent most of his 31-year military career in shadowy Special Operations assignments. He commanded a Special Forces quick-reaction team that flew to Afghanistan in December 2001 to help a team accidentally struck by an American bomb. They stayed to increase security around Hamid Karzai, who had just been named Afghanistan’s interim president. During the Iraq war, Mr. Miller hunted high-value insurgent leaders.
In 2018, he became a top counterterrorism official at the National Security Council, the arm of the White House that helps manage interagency matters involving the military, intelligence and foreign policy.
Mr. Miller frequently worked with Mr. Patel, a former aide to Representative Devin Nunes of California, the top Republican on the House Intelligence Committee and an outspoken supporter of Mr. Trump.
By contrast, Mr. Miller is not known as a partisan ideologue, according to interviews with officials who have worked with him. His counterterrorism and hostage-focused portfolio has permitted him to largely avoid national security issues that have attracted political furor during the Trump era, like Russia. His watch at the National Security Council included meetings that led to the American commando raid in northwest Syria last year to kill the leader of the Islamic State, Abu Bakr al-Baghdadi, and he has gained the trust of officials like Mr. O’Brien and Mr. Patel.
This year, Mr. Miller briefly moved to a counterterrorism role at the Pentagon before the Senate in August confirmed him to lead the National Counterterrorism Center, an agency created after the attacks of Sept. 11, 2001, that is supposed to serve as a clearinghouse for terrorism threat information and coordinate intelligence sharing between organizations including the C.I.A., the F.B.I. and the National Security Agency.
The center is not supposed to play an operational role. But as Mr. Miller studied intelligence reports about the Shabab’s senior leadership and Somalia, he told colleagues that it might be possible to change the equation that has kept the United States locked in irregular warfare with the Shabab — including periodic drone strikes targeting suspected militants and the deadly Shabab assault on an American air base at Manda Bay, Kenya, in January.
American officials have long struggled with how to think about the Shabab — a loosely organized collection of factions, most of whom are focused on the parochial goal of controlling Somalia but some of whom want to participate in Al Qaeda’s global jihad, carrying out terrorist attacks beyond its borders.
Near the end of the Obama administration, the executive branch deemed the entire group an enemy in the war on terrorism, and Mr. Trump eased limits on military strikes in Somalia. But years of fairly regular bombings have failed to bring the Shabab to heel, and in its fourth year the Trump administration has flirted with the idea of pulling back from the Horn of Africa.
Amid that churn, Mr. Miller wondered whether it would be possible to separate key Shabab factions from Al Qaeda to reduce its threat to American interests beyond Somalia’s borders. He focused on a group of about 10 older leaders with strong personal ties to Al Qaeda, rather than younger, more nationalistic Shabab leaders.
It was difficult to obtain accurate, timely intelligence to target and kill the Qaeda-linked Shabab leaders. Mr. Miller raised ideas for isolating or eliminating them: Perhaps the younger leaders could be persuaded to rebel against them, or the older cohort could be bought off to sideline themselves from the struggle, the officials said.
It made sense that Mr. Miller would be attracted to the idea of striking an unorthodox deal with elements of an Islamist militant group to try to diminish the terrorist threat, given his previous experience as a Green Beret officer in Afghanistan and Iraq, said Luke Hartig, a former senior director for counterterrorism at the National Security Council during the Obama administration who has worked with Mr. Miller.
“Based on Chris Miller’s military background in the Special Forces, he would certainly have a lot of interest in working with irregular forces or others to defeat our terrorist enemies,” Mr. Hartig said.
The Qataris had experience as the intermediary for peace talks with the Afghan Taliban. Mr. Miller went to Mr. Patel with his idea of enlisting them for a similar outreach effort. With the National Security Council’s blessing, Mr. Miller approached Qatar’s ambassador to the United States to obtain the blessing of the country’s emir to pursue the idea.
Then, over the Columbus Day weekend, Mr. Miller and aides flew to Doha to open talks with senior Qatari officials, including its foreign minister and top counterterrorism leaders. The Qataris were said to have expressed interest in some of the ideas but were cautious about how to proceed. As a preliminary step, they proposed looping in Norwegian diplomats who had also served as go-betweens with the Taliban.
Mr. Miller returned from his trip with a proposal to schedule three-way talks with Qatar and Norway to flesh out the proposals, according to the officials. At that point, however, Mr. Pompeo and his top aides became aware of his efforts.
The move was seen within the State Department as freelance diplomacy — an intrusion into Mr. Pompeo’s turf — and, more broadly, many counterterrorism policy officials viewed it as insufficiently thought out.
Among the problems: figuring out whom to talk to in the Shabab, whose leaders tend to kill one another when they have ideological disputes; figuring out what the effort would mean for the fledgling Somali government the United States is supporting; and vetting the public-relations risks of negotiating with Qaeda-linked figures.
Mr. Pompeo insisted that the State Department take over the initiative from Mr. Miller. He referred the matter to the department’s Africa Bureau, where officials said it was widely seen as bureaucratically dead even before Mr. Trump lost the election — and a reversal that has exposed the American government to looking flighty in the Middle East.
“This story is strange on so many levels,” Ms. Bacon said. “Reducing the threat to U.S. interests by eliminating 10 Shabab operatives doesn’t hold up. The threat from Shabab isn’t that simple. We have already tried that, and it hasn’t worked.”
Thom Shanker contributed reporting.