Within hours of celebrating President Trump's biggest legislative achievement, at the South Portico of the White House on Wednesday, his aides and outside advisers had a spirited, and at times tense, discussion with him about the political outlook ahead of next year's midterm elections.

The gathering saw tempers flare as aides vented their frustrations with electoral defeats this year and concerns about the 2018 political map, according to several people with knowledge of the discussion. Complaints about the president's political operation and the Republican National Committee boiled over, playing out in front of the president as an inner-circle drama.

The late-afternoon meeting — attended by White House Chief of Staff John F. Kelly, counselor Kellyanne Conway, political director Bill Stepien, marketing and data specialist Brad Parscale, communications director Hope Hicks and political consultant and confidant Corey Lewandowski, among others — quickly became a griping session for Lewandowski and others about the way the White House manages the GOP and handles its planning for what is sure to be a hotly contested campaign season, people familiar with the meeting said.

[After tax bill’s passage, tensions over what Republicans should do next]

Lewandowski told the president that the RNC was not raising nearly enough money — even though the party has raised record sums — and not doing enough to support his agenda. The former Trump campaign manager also griped that he could no longer get his calls returned from the White House, these people said, and was being blocked by the president's assistant and others under the direction of Kelly.

Lewandowski complained, too, about the Office of Public Liaison, saying it was not effective in building out Trump's relationships and the White House's message. Other advisers present outlined to the president what could be a difficult year ahead and urged the White House to beef up its management of the political calendar and party efforts.

Trump did not react angrily to what Lewandowski said and instead listened and watched for the reaction of others, revealing little about where exactly he lands in these debates among Trump associates, the people added.

But essentially, Lewandowski tried to convince the president that "he wasn't being served well," in the words of one person with knowledge.

While Trump did not signal whether he would act on Lewandowski's suggestions, some White House aides bristled at the outside adviser's attempt to steer the political strategy. Later, outside the Oval Office, Stepien and Lewandowski had a "very intense" conversation about the broader political operation and what some aides see as Lewandowski's meddling in it from the outside, while Lewandowski questioned Stepien's performance, according to advisers with knowledge. The men were later spotted by other aides continuing to argue outside.

A White House spokeswoman declined to comment.

The meeting and the conflicts underscore the tension surrounding the president's political operation — and the occasional chaos that arises, even as Kelly has tried to impose more order. Advisers such as Lewandowski and former White House chief strategist Stephen K. Bannon, now at Breitbart, continue to talk to the president, who likes them personally, even as other advisers try to keep them away.

There are also strains inside the White House among the political affairs team, the RNC and some of Trump's closest counselors on the outside — and they are all competing for Trump's ear, the people said, requesting anonymity to speak candidly about private conversations.

There were points of unity in the meeting. All sides of Trump's orbit are hoping that the recently passed Republican tax bill becomes more popular in upcoming months and that the federal Russia probe turns its focus away from issues or people close to the president. Trump made clear to his advisers that he wants to be heavily involved in the upcoming elections, although it is unclear how many places will welcome a presidential visit.

Trump's reaction to the meeting could play out in the coming days and weeks while he is away at his Mar-a-Lago resort in Florida, advisers said. But with 2018 and its stakes frequently on his mind, changes of personnel or strategy are possible, the people said.

One White House official briefed on Trump's lunch with former chief of staff Reince Priebus on Tuesday said they mainly strategized about 2018, and Priebus gave the president warnings about the electoral landscape. Afterward, Trump told others that Priebus expressed concerns about the midterms. Priebus could not be reached for comment.

Kelly has occasionally grumbled about the RNC and its chairwoman, Ronna McDaniel, advisers say. A number of senior advisers in the White House say that the RNC is not doing enough to defend the president and that its communications and political operation need to be improved — with more Trump loyalists installed. Meanwhile, they complain that Bob Paduchik, a Trump ally at the RNC, has suffered slights there.

In turn, the RNC often finds itself at the whims of a president that can reverse on a dime, as he did in the Alabama special election for U.S. Senate that was won by Democrat Doug Jones this month. McDaniel has told officials at the RNC that her members are sometimes at odds with the White House. And the RNC was particularly frustrated by Alabama, where Trump agreed for the group to pull out of supporting Republican firebrand Roy Moore's campaign but then backed Moore and forced the RNC to reverse its stance.

Several White House officials said that they do not expect major changes at the RNC and that Trump continues to praise McDaniel in private. But there is talk of putting more Trump people at the organization or trying to take more control.

An RNC spokeswoman did not immediately respond to a request for comment.