WASHINGTON — After White House chief of staff John Kelly pressured President Trump last fall to install his top deputy, Kirstjen Nielsen, atop the Department of Homeland Security, the president lost his temper when conservative allies argued she wasn’t sufficiently hardline on immigration.

“You didn’t tell me she was a (expletive) George W. Bush person,” Trump growled.

After Kelly told Fox News Channel’s Bret Baier in a January interview that Trump’s immigration views had not been “fully informed” during the campaign and had since “evolved,” the president berated Kelly in the Oval Office – his shouts so loud they could be heard through the doors.

And just 11 days ago, Kelly grew so frustrated on the day that Trump fired Veterans Affairs Secretary David Shulkin that Nielsen and Defense Secretary James Mattis both tried to calm him down and offer pep talks, according to three people with knowledge of the incident.

“I’m out of here, guys,” Kelly said – comments some interpreted as a resignation threat, but according to a senior administration official, he was venting his anger and leaving work an hour or two early to head home to decompress.

DOWNWARD ARC

The recurring and escalating clashes between the president and his chief of staff trace the downward arc of Kelly’s eight months in the White House. Both his credibility and influence have severely diminished, administration officials said, a clear decline for the retired four-star Marine Corps general who arrived with a reputation for integrity and a mandate to bring order to a chaotic West Wing.

Kelly no longer lurks around the Oval Office, nor listens in on as many of the president’s calls, even with foreign leaders. He has not been fully consulted on several recent key personnel decisions. And he has lost the trust and support of some of the staff, as well as angered first lady Melania Trump, who officials said was upset over his sudden dismissal of Johnny McEntee, the president’s 27-year-old personal aide.

“When you lose that power,” said Leon Panetta, a Democratic former White House chief of staff, “you become a virtual White House intern, being told where to go and what to do.”

This portrait of Kelly’s trajectory is based on interviews with 16 administration officials, outside advisers and presidential confidants, many of whom spoke on the condition of anonymity to assess the chief of staff. Kelly declined interview requests.

In large part because of his military credentials, Kelly still commands a level of respect from Trump that sometimes eluded his predecessor, Reince Priebus, whom the president would derisively refer to as “Reincey.”

On issues such as national security and immigration, Trump continues to listen to Kelly. And for all the evident chaos, the West Wing now features less knife-fighting and dysfunction than in the early months, when Trump set Priebus on co-equal footing with then-chief strategist Stephen Bannon.

One senior White House official disputed that Kelly’s relationship with Trump has been especially turbulent in recent weeks, noting that the president still talks to him more than any other official. This official explained that Kelly initially viewed his job as babysitting, but now feels less of a need to be omnipresent, while Trump, who once considered Kelly a security blanket, feels increasingly emboldened to act alone.

STAR TARNISHED

But both inside and outside the White House, Kelly’s credibility has suffered from a string of misstatements, most recently over his management of domestic abuse allegations against former staff secretary Rob Porter and of Trump’s decision to oust Army Lt. Gen. H.R. McMaster as national security adviser. And for all the structure he has brought to the bureaucracy, colleagues still view Kelly as tone-deaf in dealing with politics.

Kelly is the latest high-profile example of a West Wing Icarus – swept high into Trump’s orbit, only to be singed and cast low. Nearly everyone who has entered the White House has emerged battered – rendered a punch line (former press secretary Sean Spicer), a Justice Department target (former national security adviser Michael Flynn) or a diminished shell, fired by presidential tweet (Rex Tillerson).

No one knows how many days remain for Kelly, but when he leaves – either by the president’s hand or from his own mounting frustration – he is almost certain to limp away damaged.

“Everybody in the orbit of Donald Trump gets sucked in and tarnished or destroyed,” said Chris Whipple, author of “The Gatekeepers,” a history of White House chiefs of staff. “Kelly has been tarnished, no doubt about it.”

INITIAL SUCCESS

When Kelly, then the homeland security secretary, was appointed chief of staff last July, the news was met with enthusiasm. Many Trump watchers hoped he would prove a voice of reason and restraint in an administration often perceived to be teetering out of control. And many West Wing aides similarly welcomed the new discipline, believing Kelly’s regimen would free them to do their jobs.

Initially, at least, Kelly was successful. He began closing the door to the Oval Office, so aides couldn’t simply loiter outside or wander in and out, hoping to sway the president on issues outside their purview.

He made meetings smaller, which helped cut down on leaks to the press and made conversations more efficient. And he limited the number of staff who had walk-in privileges to the Oval Office to a small group.

“I didn’t know the Oval Office even had a door,” one staffer joked to Kelly, several months after he’d taken over. Kelly, meanwhile, marveled that in the early days staffers sometimes entered still chatting on their cellphones.

Under Kelly’s watch, the president now has “Policy Time,” sessions once or twice a day where advisers present and argue their competing views over a specific issue, with Trump presiding.

He has also implemented bi-monthly Cabinet meetings, with a focused agenda, as well as restored order to the morning senior staff meeting. And attendance for most Oval Office meetings is still run through Kelly’s office.

TRUMP CHAFING

But about a month into Kelly’s tenure, Trump began to chafe at the strictures.

The president invited staff and Cabinet secretaries into the Oval Office without scheduled appointments and called friends and advisers late at night, without Kelly’s sign-off. An early sign of trouble came when Trump polled confidants about his enforcer: “What do you think of Kelly? How’s Kelly doing?” the president asked.

Kelly was an intimidating presence, confiding to some colleagues that he preferred to be feared rather than loved. Yet he was reluctant to be the bearer of bad news. Enter Nielsen, who centralized power as his enforcer, earning her internal enemies.

Kelly asked that staffers back-brief him when the president violated his processes – for instance, by calling a staffer to demand action after watching a Fox News segment. But several aides said they found Kelly difficult when they retroactively filled him in. He often repeated a version of the same response: “I guess you’re the chief of staff now, so why don’t you handle it?”

There were other signs of tensions, as well.

Early on, Kelly convened a video conference with aides staffing Trump on vacation at his golf course in Bedminster, New Jersey. He was beamed in from Washington but erupted when the audio didn’t work. “This is (expletive) ridiculous,” he said, canceling the meeting and storming out of the room. Aides who had not been aware of his temper were stunned.