KYIV, Ukraine — The White House was alerted as early as mid-May — earlier than previously known — that a budding pressure campaign by Rudy Giuliani and one of President Donald Trump's ambassadors was rattling the new Ukrainian president, two people with knowledge of the matter tell NBC News.

Alarm bells went off at the National Security Council when the White House's top Europe official was told that Giuliani was pushing the incoming Ukrainian administration to shake up the leadership of state-owned energy giant Naftogaz, the sources said. The official, Fiona Hill, learned then about the involvement of Lev Parnas and Igor Fruman, two Giuliani associates who were helping with the Naftogaz pressure and also with trying to find dirt on former Vice President Joe Biden’s son Hunter.

Hill quickly briefed then-national security adviser John Bolton about what she'd been told, the individuals with knowledge of the meeting said.

The revelation significantly moves up the timeline of when the White House learned that Trump's allies had engaged with the incoming Ukrainian administration and were acting in ways that unnerved the Ukrainians — even before President Volodymyr Zelenskiy had been sworn in. Biden had entered the presidential race barely three weeks earlier.

President of Ukraine Volodymyr Zelenskiy attends a meeting with representatives of the International Monetary Fund in Kiev, Ukraine May 28, 2019. Ukrainian Presidential Press Service / Reuters

In a White House meeting the week of May 20, Hill was also told that the ambassador to the European Union, Gordon Sondland, a major Republican donor tapped by Trump for the coveted post in Brussels, was giving Zelenskiy unsolicited advice on who should be elevated to influential posts in his new administration, the individuals said. One of them said it struck the Ukrainians as "inappropriate."

Zelenskiy was inaugurated that same week — on May 20 — snapping selfies and giving high-fives to the crowd as he made his way through the Ukrainian capital for his speech to parliament.

Hill learned of Zelenskiy's concerns from former U.S. diplomat Amos Hochstein, now a member of Naftogaz's supervisory board. Hochstein had just returned from a pre-inauguration meeting with Zelenskiy and his advisers in Kyiv in which they discussed Giuliani's and Sondland's overtures and how to inoculate Ukraine from getting dragged into domestic U.S. politics.

Zelenskiy's early concern about pressure from Trump and his allies, expressed in the May 7 meeting with his advisers and Hochstein, was earlier reported by The Associated Press. The fact that those concerns were then quickly relayed to the White House National Security Council has never previously been reported.

Bolton declined to comment. Hill, through her attorney Lee Wolosky, also had no comment. The White House did not immediately respond to a request for comment.

The White House meeting also offers some of the first indications of what led Hill to conclude that Giuliani and Sondland were part of a squad running a "shadow Ukraine policy," as she later would testify to Congress.

Sondland had no official role overseeing Ukraine, a country not part of the E.U. Giuliani, Trump's personal lawyer, isn't even a government employee. Hill testified that Bolton later privately called Giuliani a "hand grenade" and described Sondland's push on Ukraine as part of a "drug deal."

Hochstein declined to comment to NBC News on his White House meeting with Hill, which came up during her roughly 10-hour deposition in the House earlier this month. Hill resigned from her post over the summer.

The early involvement by Giuliani, Sondland and their associates in exerting influence over the new Ukrainian leader illustrates how political goals and potential profits have blended together in the extraordinary chain of events being detailed in the impeachment proceedings. House investigators are probing allegations Trump abused his power by pressing Ukraine to pursue investigations for his personal political gain.

Giuliani, as he sought information from Ukrainians that could help Trump's re-election, was getting help from Parnas and Fruman, two Florida businessmen, documents given to Congress by the State Department's inspector general show.

At the same time, the pair was trying to make big money by drumming up business selling natural gas to Naftogaz, and to oust the company's management — with help from Giuliani and friends in the Trump administration, NBC News has reported. Separately, Parnas and Fruman were recently charged with violating campaign finance laws for allegedly trying to funnel foreign money into U.S. elections.

Central to Giuliani's scheme were efforts to get Zelenskiy to announce an investigation into a different Ukrainian energy company: Burisma Holdings, the natural gas firm whose board Biden's son Hunter joined years earlier.

Sondland, as he tried over the summer to secure a White House visit for Zelenskiy and the release of military aid to Ukraine, worked with Giuliani and others to pressure Zelenskiy over investigations into Burisma and the 2016 election. House Democrats allege it was a quid pro quo ordered by Trump in an impeachment-worthy abuse of power. Trump denies any quid pro quo.

Sondland and Energy Secretary Rick Perry also backed an effort to change the membership of Naftogaz's supervisory board, NBC News previously reported. The board includes four international members and three Ukrainian nationals. A person close to Sondland said he and Perry merely wanted changes to the governance and structure of Naftogaz's board needed to secure Western investment in Ukraine's energy industry.

Zelenskiy's May 7 Kyiv meeting with Hochstein and top aides in which he voiced dismay about Giuliani and Sondland included Andriy Kobolev, Naftogaz's CEO. It took place the day after the State Department announced then-Ambassador to Ukraine Marie Yovanovitch was returning home ahead of schedule.

"The message was clear: 'You better listen to us. If we tell you to investigate Biden, you better do it. Look at what happened to (Yovanovitch),'" said one individual familiar with the outlook of Zelenskiy's office at the time. "They saw that Giuliani went after her — and he won."

Yovanovitch's ouster is of key interest to impeachment investigators. Her departure created a void at the U.S. Embassy in Kyiv that Sondland felt he was helping to fill as he made personnel recommendations to the new Zelenskiy administration, the person close to Sondland said.

Her replacement as top diplomat, Bill Taylor, did not arrive in Kiev until June 17. House Democrats have described his nine-plus hours of testimony this month as among the most damning to Trump so far.

Yovanovitch's abrupt recall months ahead of schedule left no doubt for Zelenskiy and his aides that Giuliani's agenda had Trump's full backing and that his government would have to somehow address the demands for investigations and changes at Naftogaz, individuals familiar with the matter said.

Zelenskiy, thrust into a precarious position by the impeachment proceedings against a president who still controls U.S. policy toward Ukraine, has publicly insisted his administration did not feel pressured.

But Sen. Chris Murphy, D-Conn., who visited Zelenskiy last month aiming to persuade him not to get dragged into the U.S. political fracas, said the young Ukrainian president simply can't afford to acknowledge publicly what was evident during his trip to Kyiv.

"They felt pressure. No doubt they felt pressure," Murphy said Sunday on CNN. "Of course he is going to say that, you know, he didn't and doesn't feel any pressure, there was no blackmail, because he's got to make sure that Trump continues to support his country. But there is absolutely no doubt that the Ukrainians felt pressure to do what Giuliani was asking."

Dan De Luce and Carol E. Lee reported from Washington.