WASHINGTON — General John F. Kelly needed to deal with Al Qaeda, urgently. It was 2008, and insurgents were operating with near impunity in the territory between two US commands.

So Kelly, then the Marine general in charge of Anbar province, and a like-minded commander hatched a plan to cut through military bureaucracy: They simply moved their military boundaries and took the refuge away from the enemy. What they didn’t do was seek permission from military higher-ups in Baghdad.

“Our senior commander was busy with his own issues in the capital,” explained retired General Mark Hertling, who controlled the territory next to Kelly’s. “You overcome your bosses’ approach by combining forces and doing the kinds of things you want to do.”

Advertisement

If only taming an erratic billionaire and reality-TV-star-turned-president were as simple as cutting through red tape.

Get This Week in Politics in your inbox:

A weekly recap of the top political stories from The Globe, sent right to your email.

Circumventing the brass in Baghdad worked because the generals showed results
. It’s an open question how well retired General Kelly’s confidence and decisiveness will serve him in his current mission, as White House chief of staff.

The stakes for the nation could not be higher. Kelly, a Boston native, has been on the job for two months and finds himself with a boss who is distracted and unpredictable. He’s contending with a leader who has issued bellicose threats at the United Nations about destroying North Korea; picked racially tinged fights over patriotism and free speech with the National Football League; and attacked the mayor of hurricane-ravaged San Juan, Puerto Rico.

Kelly, along with Secretary of Defense James Mattis and Secretary of State Rex Tillerson, is among a cadre of top officials who “separate our country from chaos,” Republican Senator Bob Corker of Tennessee, chairman of the Foreign Relations Committee, said Wednesday.

So far, to the public at least, Kelly is best known for a series of outtakes — moments when the camera has focused on his seemingly anguished facial expressions while Trump has said something controversial. Trump gave Kelly an awkward shoutout Tuesday during a trip to Puerto Rico to review to hurricane relief efforts.

Advertisement

“He likes to keep a low profile,’’ Trump said. “He’s sitting in the back, but boy is he watching. General Kelly — he’s a four star, not a bad general. You don’t get any better than General Kelly.”

The new chief of staff is often painted as an outsider, but he does have a deep well of experience to draw on to put the White House on firmer ground. He has been a fixture in Washington power circles long enough to make the speaking rounds at top Beltway institutions — even Hillary Clinton’s campaign chairman, John Podesta, was invited to one event. He has forged ties among members of the House and Senate, with whom he has traveled or met in far-flung, war-torn countries.

And his time in the military taught him to create order from chaos, a skill badly needed in a White House roiled by competing factions and populated by outsiders who have no idea how to get things done in Washington.

He and Trump have some traits in common, most importantly: “Neither is particularly ideological,” said Senator Tom Cotton, an Arkansas Republican and one of the people who recommended that Kelly join the Trump administration.

Cotton has noticed welcome changes since Kelly took over in late July. “The president still calls regularly,” Cotton said. “And sometimes at odd hours. But it’s less common that I don’t have notice that the call is coming.”

Advertisement

When he visits the White House, Cotton also sees a difference, and added: “Kelly is running a slightly more buttoned-up type of ship.”

That doesn’t mean he’s been able to steer the ship into calm waters.

The Trump administration faces massive criticism for the slow response to the humanitarian disaster in Puerto Rico. Health and Human Services Secretary Tom Price resigned over his use of costly charter planes at taxpayer expense. Top White House aides reportedly used personal e-mail accounts to do government work; a Senate candidate Trump backed in Alabama lost his primary; a third attempt to repeal and replace the Affordable Care Act died in the Senate.

And all of that was just in the last two weeks.

Strong Boston roots

John Kelly, 67, grew up in Boston’s Brighton neighborhood. He took the bus to St. Mary’s High School in Waltham, one of several neighborhood kids who rode together. The group included Bill Galvin, who would go on to be Massachusetts’ secretary of state.

“He was well thought of and well liked,” recalled Galvin, who said that Kelly’s father, whom he still refers to as “Mr. Kelly,” delivered mail. The caption of Kelly’s yearbook photo describes him as “considerate” and “friendly.” And it includes the slogan “California or bust,” a hint that he’d want to go beyond Boston.

He joined the Marines Corps in 1970 and achieved the rank of sergeant but returned to the Bay State for college, graduating from the University of Massachusetts in 1976. Then he was back to the Marines, where he spent the next 40 years.

Kelly leaves little doubt about where he was raised. During a human rights summit in Washington, he somewhat randomly alluded to his Hub roots while describing the buffet at a breakfast he’d attended.

He retains a thick Boston accent. Retired General John Allen said in an interview that the commanders would joke that people needed an interpreter to understand him.

Even at the Department of Homeland Security, where Kelly was the secretary from January to August, he would be teased for how he pronounces the word “law.”

“When you talk to him it’s ‘lar,’ — ‘lar enforcement,’ ” said David Lapan, the spokesman at Homeland Security.

Many departures

Kelly quickly engineered a shake-up after Trump moved him from Homeland Security (the department that is now under fire for its handling of Puerto Rico hurricane relief efforts). At the White House, he replaced Reince Priebus, the former head of the Republican National Committee, whose inability to exert control over the staff contributed to the president’s rocky start. Predictably, Kelly is winning as many enemies as friends.

Under Kelly’s short reign many of the populists and more controversial Trump aides have left, including Anthony Scaramucci, the communications director whom Kelly fired swiftly; Stephen K. Bannon, once Trump’s chief strategist; Sebastian Gorka, a frequent surrogate; and Keith Schiller, a longtime Trump Organization employee who, at the White House, was best known for delivering a letter telling Trump’s FBI director James Comey that he was fired.

Trump’s
base, fearful that Kelly is part of a plan by bureaucrats to neuter Trump, is not pleased. Bannon’s media organization, Breitbart News, is blasting out negative headlines about Kelly, including one titled: “Chief of Staff Ensuring Exposure to Populist Nationalism Now Close to Zero.”

Even those who acknowledge the White House is operating more smoothly under Kelly worry that the new chief of staff is exacting a high price for orderliness.

“If the cost is the dissolution of the Trump agenda, and he becomes another establishment Republican and nothing changes in Washington, what was the point of the election?” said Roger Stone, a Trump confidant.

How Trump is responding to Kelly’s organizing efforts is a subject of constant debate in Washington.

“I know when he was secretary of homeland security, that rapport was definitely there, they got on very well,” said Gorka, who is now the chief strategist at a new group called the Make America Great Again Coalition. “Talking to people still inside the building, clearly the general has imposed his structure on the building. I’m not sure the president is happy with the way he is being, quote-unquote, managed.”

Sarah Sanders, the White House spokeswoman, disputed Gorka’s comments, saying the former West Wing staffer misunderstands the role for which Kelly was hired.

“No one thinks that this job is about managing the president,” she said. “He’s been very clear, his job is to manage the staff and be sure the president is responsibly staffed.”

Sanders says she appreciates the transparency Kelly has brought to the job. “He’s not somebody who beats around the bush,’’ Sanders said. “You know pretty quickly where you stand.”

Loss of a son

Part of Kelly’s aura comes from the sacrifice that his family has already made for the country. In November 2010, one of his sons, Second Lieutenant Robert M. Kelly, died in southern Afghanistan while leading a platoon of Marines. John Kelly, then a lieutenant general, became the highest ranking service member to lose a child in Iraq or Afghanistan.

“John rarely mentions it and is never maudlin about it,” said former defense secretary Ashton Carter
.

He does not have to. Every military or former military service member interviewed for this story mentioned the death. They also universally recounted how Marine Corps General Joseph Dunford, now chairman of the Joint Chiefs of Staff and a person who has long been close with the Kelly family, was the one to knock on Kelly’s door and inform him of the death.

It’s trite to say that patriotism runs deep with America’s generals. Allies say Kelly is the embodiment of the stereotype.

During the runup to Kelly’s confirmation hearing to be secretary of homeland security, a Republican operative offered him an American flag pin to add to his lapel.

‘Bigger than life’

There’s some irony in the fact that Kelly’s new role of chief of staff includes instilling rigid processes and discipline to control the flow of information and people in the White House. Because for years Kelly relished working around systems that he felt were constraining.

“Bureaucracies are bureaucracies. They are all the same,” Kelly explained in an October 2015 talk he gave at the Center for Strategic and International Studies, a Washington think tank. “The one single thing a bureaucracy does before anything else is protect its rice bowl. Right?”

Kelly made it clear that he dislikes the “rice bowl” mentality. And he views the military as able to operate, largely, outside it.

“Our culture is one of a bias for action,” Kelly said at a December 2014 human rights summit in Washington. “Of not being tied down by who is really in charge of the thing.”

One example he likes to recite is from Iraq in 2008, when Sunni leaders cooperated with American forces to push out Al Qaeda fighters. Kelly wanted to further good will with the sheiks and kick-start an agricultural economy. But, as a self-described city boy from Boston, he wasn’t sure how to do that.

He asked for help, and was sent several people from the Department of Agriculture. “They were bureaucrats from Washington,” Kelly recounted at the human rights summit. “They were no better at chickens than I am. And chickens, to me, you get in a grocery store.”

Kelly turned to a program at Texas A&M University, which sent a team to help with what amounted to an exercise in the sort of foreign nation-building Trump denounced in the 2016 campaign. The livestock was in bad shape. Herds of sheep had teeth ground from the sand, suffered from poor nutrition, and were infected with parasites. Farmers needed tractors, new seeds, and fertilizer.

Kelly was gung-ho about fixing it.

“He was bigger than life,” said Benji Parham, who was sent by Texas A&M to assess agricultural needs in Anbar and other parts of Iraq. “When he walked in he was bigger than John Wayne.”