In the days following a July meeting at the White House, senior officials in the National Security Council reached out to their Ukrainian counterparts in an effort to circumvent U.S. Ambassador to the European Union Gordon Sondland and the “amigos” to establish a direct line of communication with Kyiv, according to officials in both the U.S. and Ukraine.

Charles Kupperman, President Donald Trump’s former deputy national security adviser, contacted Ukrainian officials close to President Volodymyr Zelensky via telephone in mid-July after a tumultuous meeting at the White House in which Sondland told the Kyiv representatives that they would need to launch certain domestic investigations in exchange for a presidential meet in Washington, according to three officials familiar with the matter. Kupperman was not the only official to reach out, the sources said.

The meeting in question took place July 10 at the White House between senior Ukrainian officials, former National Security Adviser John Bolton, and other U.S. officials, including the president’s former Russia adviser Fiona Hill, national security official Lt. Col. Alexander Vindman, Energy Secretary Rick Perry, former top diplomat for Ukraine Kurt Volker, and Sondland. The Ukrainians visited Washington to discuss a roadmap for U.S.-Ukrainian relations that included how the two countries could work together in the energy sector. But as The Daily Beast reported last week, that meeting turned sour quickly.

Kupperman, who was on the Trump-Zelensky July 25 call, and other national security officials’ outreach was meant to course correct a meeting that left the Ukrainian officials uncomfortable and confused about Washington’s messaging, sources said. The overtures underscore the extent to which Bolton’s National Security Council wanted to work around Sondland and others he coordinated with in their efforts to convince Ukraine to launch investigations into Burisma, the natural gas company on whose board Hunter Biden sat, and the 2016 presidential election. Witnesses in the House impeachment inquiry testified that Bolton equated Sondland’s work to a “drug deal” that he had cooked up with acting White House Chief of Staff Mick Mulvaney. Trump fired Bolton in September.

Both Kupperman and the National Security Council did not respond to requests for comment for this story.

Sources said the need for a course correction with Ukraine came as a result of the conversations that took place in the Ward Room of the White House after the official meeting with Bolton July 10.

Sondland moved the conversation into the Ward Room of the White House. Bolton did not attend but asked Hill to go into the room and report back on what was being said, according to Hill’s public testimony in front of House investigators Thursday.

Hill told House investigators in her closed-door deposition last month that Bolton told her to tell John Eisenberg, the National Security Council counsel: “I am not part of whatever drug deal Sondland and Mulvaney are cooking up on this. You go and tell him what you’ve heard and what I’ve said.”

That’s when Hill went to the Ward Room. Sondland had again brought up the investigations with the Ukrainians, including Oleksandr Danylyuk, the top national security official in Ukraine, and Zelensky aide Andriy Yermak. The Daily Beast previously reported that Sondland grew emotional in the meeting and began to demand the investigations from the Ukrainians. Hill told House investigators the Ukrainian officials at one point were asked to move into the hallway and that Vindman told Sondland bringing up the investigations was inappropriate.

Hill said she too stepped in to address Sondland’s remarks.

“I pointed out that this wasn’t an appropriate place to be having a discussion about what was going to be a deliberative process about how one goes about setting up a meeting and the timing of it and the content of it,” Hill said in her impeachment deposition in October. “It’s completely inappropriate to have, you know, the ambassador to the EU take the Ukrainians down to the Ward Room to have a huddle on next steps about getting a meeting with the president of the United States.”

In the weeks that followed, the National Security Council kept in contact with senior Zelensky officials in an attempt to re-establish the normal lines of communication with the Ukrainian national security apparatus.

Like Bolton, Kupperman left his post in September. The House subpoenaed him to appear for a deposition. However, Kupperman filed a lawsuit last month to seek a judicial ruling on whether he is required by law to testify. Last week Trump moved to dismiss that lawsuit, claiming Kupperman should follow his direction instead of seeking legal guidance.