White House chief strategist Stephen K. Bannon, left, and White House chief of staff Reince Priebus listen during a meeting with House and Senate legislators in the Roosevelt Room of the White House on Feb. 2 (Jabin Botsford/The Washington Post)

Soon after President Trump lifted off from the South Lawn of the White House for a long weekend in Florida, the administration’s communications and policy teams convened for a staff mixer.

The Friday gathering in the Eisenhower Executive Office Building was both social and practical: While the senior staff had been working closely together, many others still did not know each other’s names, portfolios or phone extensions at a time when communication breakdowns threatened to hamper Trump’s young presidency.

But the brief break soon gave way to another crisis when on Friday evening a federal judge temporarily halted Trump’s week-old ban preventing refugee entries for 120 days and individuals from seven majority-Muslim countries from entering the United States for 90 days.

The judge’s ruling sent the administration scrambling yet again on an issue that has bedeviled officials, sowed confusion at airports worldwide and pushed tens of thousands of protesters to the streets. It came at the end of a week when Trump, upset that early stumbles had undermined his policies and image as a can-do executive, had taken steps to try to present a new sense of competence.

At a senior staff meeting last Monday, according to one adviser in attendance, the president delivered an unmistakable decree: “Reince [Priebus] is in charge. He’s the chief of staff. Everything has to go through him.”

(Thomas Johnson/The Washington Post)

That directive included setting clearer boundaries among the various departments and assertively tamping down reports of staff infighting, which aides said personally angered the president.

Over the rest of the week, Priebus sought to assert control over the policy process and interagency communications, slowed the assembly line of executive orders to avoid errors and tried to organize the daily rhythms in the White House.

“This is the chief of staff saying, ‘Look, we have a very qualified team here, and we want to make sure that everyone has time and opportunity to make comments on these policies,’ ” said Katie Walsh, a deputy chief of staff.

The big thinker remains chief White House strategist Stephen K. Bannon, who has used chaos as a tool for implementing transformative policy but who aides said is now trying to adapt to working within Priebus’s structure.

“Some of us are a little more aggressive than others, and others have a more calming influence, and it’s what makes a perfect partnership,” Bannon said. “There’s no daylight between us, and there’s really no daylight with the president.”

One senior White House official, who spoke on the condition of anonymity to be candid, said the issue isn’t so much about areas of responsibility but about whether people can stay within them.

“These clearly marked lines have always been in place,” the official said. “The question is: Are people coloring outside the lines? Do people do an end run?”

Bannon’s rising profile — captured on this week’s cover of Time magazine, which labeled him “The Great Manipulator” — caught the attention of senior officials, as well as Trump, who takes pride in his own cover appearances and inquired about Bannon’s Time debut with aides.

News reports have depicted Trump’s West Wing as two warring factions, pitting Bannon and senior policy adviser Stephen Miller against Priebus and his cohort of deputies. But top officials rejected that portrayal, saying they spend much of their time working collaboratively — whether in Priebus’s spacious corner office, where he keeps a fire crackling, or in the Oval Office with the president.

“We basically live together, and we’re on the same page with everything,” Priebus said, referring to Bannon, Walsh and Miller. “The four of us have become super tight. I think we’ve figured out where a lot of our strengths are at.”

Miller similarly described his relationship with Priebus as “one of my closest in the whole administration — hands down.” He added, “The idea that he and I are in a separate ‘wing’ is utterly false, totally ludicrous and spectacularly, phenomenally ignorant.”

Counselor Kellyanne Conway has been taking on a big-picture, behind-the-scenes role shaping communications strategy. She said she is in policy planning meetings, focusing on everything from the visuals of the president’s events to the messaging and planning for his executive actions, with an eye toward what she calls “RPI: real people impact.”

Trump’s team complains that the media focus too much on the mistakes of a new White House that hasn’t been given a chance to settle in. (Only two aides, deputy chief of staff Joe Hagin and advance director George Gigicos, have held senior jobs in previous administrations.) They argue that outside critics are unfairly ridiculing Trump and his team for being in over their heads, just as they did during the campaign — even though the early problems have resulted from their own actions.

“The real story of the first couple weeks is the unprecedented success of the administration in changing government and delivering on the president’s core campaign promises — one after another after another,” Miller said.

There have been successes. Last week’s rollout of Neil Gorsuch’s Supreme Court nomination and of Trump’s executive order scaling back financial regulations, for instance, were both mistake-free — in part because White House aides took pains to brief both Capitol Hill staff and journalists about their plans.

Nevertheless, the administration remains dogged by slip-ups, half-truths and bombshells, some of them set off by the president himself.

Responding to the Washington state judge’s order on the entry ban, the White House issued a statement late Friday saying the Department of Justice planned to file an emergency stay against the “outrageous order,” only to send out an updated statement 12 minutes later deleting the word “outrageous.”

The correction, which was aimed at striking a more moderate tone, was undone Saturday morning when the president went on Twitter. From his Mar-a-Lago estate in Palm Beach, Trump pecked out a trio of fiery bulletins dismissing the “ridiculous” ruling of a man he maligned as a “so-called judge” and warning that “if certain people are allowed in it’s death & destruction!”

Trump’s missives frustrated some of his aides and underscored the tension inside the West Wing between a staff striving to appear more professional and a president accustomed to indiscriminate commentary.

In addition, the White House’s statement marking the Holocaust that did not mention Jews, breaking with the bipartisan practice of presidents, sparked controversy. And Trump’s contentious phone call with Australian Prime Minister Malcolm Turnbull, the details of which were first reported by The Washington Post, ignited a diplomatic flare-up with one of America’s most steadfast allies.

“If you stumble and don’t look like you know what you’re doing, then people who voted for Trump who thought he was a competent business leader, that gets diminished,” said Ed Rollins, a Republican strategist who ran a pro-Trump super PAC. “That’s the risk at this point.”

Trump himself has been directing the minutiae of his White House, suggesting that national security adviser Michael Flynn deliver an in-person statement at Wednesday’s news briefing putting Iran “on notice” for its ballistic missile tests. Trump watched Flynn on television and was pleased, one aide said, personally congratulating him later.

Many internal debates split more over ideological lines than personal ones, with coalitions shifting depending on the issue. Trump ran as a pragmatic businessman rather than a traditional Republican and has stocked his White House accordingly, with the president consulting both social conservatives, such as Vice President Pence, and a contingent of advisers who hail from the more liberal environs of Manhattan.

In some ways, the dominant ethos of what the Trump administration hopes to be is one of efficiency and accomplishment, not ideology. Jared Kushner, a senior White House adviser and the president’s son-in-law, is working to build an in-house consulting firm, currently called the Strategic Development Group, which would likely be led by business executives Chris Liddell and Reed Cordish and reimagine the workings of the federal bureaucracy.

Trump’s decision not to move forward with an executive order that would have undone many of former President Barack Obama’s protections for lesbian, gay, bisexual and transgender individuals came only after he was lobbied by Trump’s daughter Ivanka and her husband, Kushner, and was first reported by Politico.

Trump’s adult sons are both avid hunters and have offered a more moderating voice on protections of federal lands.

Gary Cohn, a Democrat and former president of Goldman Sachs who is chairman of Trump’s National Economic Council, has helped bring a more progressive Wall Street sensibility to the administration. He worked to prevent CNBC commentator Larry Kudlow, a longtime Trump economic adviser, from joining the administration and has tried to sideline Peter Navarro, a vocal China critic and hard-liner on trade inside the White House, according to someone with knowledge of his moves.

Wall Street figures and progressive activists also see a possible ally in Dina Powell, a former Goldman Sachs executive who joined the administration and is close to Ivanka Trump and Kushner.

Ken Blackwell, a principal domestic policy adviser to the Trump transition team and a senior fellow at the conservative Family Research Council, said that Trump sees his base “as a movement that transcends the Republican Party,” with the best ideas rising out of the disorder.

“His approach is a tad bit Darwinian,” Blackwell said. “He lets folks sort of duke it out.”

On Capitol Hill, where lawmakers control the fate of Trump’s agenda on such big-ticket items as health care and taxes, Trump’s team has labored to repair relations frayed by the travel ban.

Pence acknowledged early missteps at a private luncheon Tuesday at the Capitol, telling Republican senators, “We’ll do better,” several attendees said. The role is a familiar one for Pence, whom one Hill Republican described as “the Catcher in the Rye” — perpetually defending the president and his actions.

Two senior White House aides — deputy chief of staff Rick Dearborn and legislative affairs director Marc Short — also reached out individually to scores of lawmakers with a similar message.

After Sen. Rob Portman (R-Ohio) distanced himself from the travel ban last Sunday — “You have an extreme vetting proposal that didn’t get the vetting it should have had,” he said on CNN — he said he heard immediately from White House officials.

They were conciliatory and attentive, Portman said, offering him a message that has become the White House mantra in recent days: “We’re going to do better.”