WASHINGTON — Gordon Sondland, the American ambassador to the E.U., pointed the finger at President Donald Trump, Secretary of State Mike Pompeo and former national security adviser John Bolton in explosive public testimony on Wednesday in which he said explicitly that there was a "quid quo pro" linking a White House visit by Ukraine's president to investigations into a political opponent of the president.

Under fire from all sides after multiple witnesses contradicted his earlier deposition, Sondland blamed everyone but himself for the pressure campaign on Ukraine now driving impeachment proceedings against Trump. He showed up for his televised hearing with reams of new text messages and emails he said prove the highest levels of the White House and the State Department were in on it.

"They knew what we were doing and why," Sondland told the House Intelligence Committee in his opening statement. "Everyone was in the loop. It was no secret."

He said he knew that House members have asked "was there a quid pro quo," adding that when it comes to the White House meeting sought by Ukraine's leader, "The answer is yes."

Sondland repeatedly blamed Trump for forcing him and the other two members of "the three amigos" dealing with Ukraine, special envoy Kurt Volker and Energy Secretary Rick Perry, to work with his personal lawyer Rudy Giuliani on the country's issues. All three thought it was a bad idea.

"We followed the president's orders," Sondland said. "We didn't want to work with Mr. Giuliani."

Sondland said acting White House chief of staff Mick Mulvaney and National Security Council leadership knew about the arrangement, and he also drew Pompeo more deeply into the effort than has previously been known, including with emails to the secretary and a top aide in which the basic contours of the quid pro quo alleged by Democrats seem clear.

Download the NBC News app for breaking news and politics

At the time, the Trump administration had frozen military aid to Ukraine. On Aug. 11, Sondland emailed top Pompeo aide Lisa Kenna that he and former Ukraine envoy Kurt Volker "negotiated a statement" for Ukraine's president, Volodymyr Zelenskiy, to deliver. Kenna responds saying she's passing the message along to Pompeo.

Eleven days later, Sondland wrote Pompeo directly, suggesting Zelenskiy meet Trump in Warsaw "to look him in the eye" and say he should be able to proceed on issues important to Trump "once Ukraine's new justice folks are in place." Earlier, in a July 25 phone call, Zelenskiy had told Trump that installing his own prosecutors would remove an obstacle to opening the investigations of the Bidens and the 2016 election.

"Hopefully, that will break the logjam," Sondland wrote.

"Yes," Pompeo responded three minutes later. Kenna followed up saying she would try to arrange the meeting. Ultimately, Trump sent Vice President Mike Pence to Warsaw instead.

Sondland testified that he told Pence "before the meetings with the Ukrainians that I had concerns that the delay in aid had become tied to the issue of investigations."

Further implicating Pompeo, Sondland testified that it was "based on my communications with Secretary Pompeo" that he felt comfortable telling a top Zelenskiy aide the funds likely wouldn't be unfrozen until Ukraine committed publicly to the investigations sought by Trump. Those included probes into former Vice President Joe Biden's family and alleged Ukrainian meddling in the 2016 election.

"State Department was fully supportive of our engagement in Ukraine affairs, and was aware that a commitment to investigations was among the issues we were pursuing," Sondland testified.

Sondland also pushed back against claims from other witnesses that he'd been engaging in "irregular" policymaking outside of official channels. Sondland said everyone was aware he, Perry and Volker were dealing with Ukraine at Trump's request. "We never thought it was irregular. We thought it was in the center lane," Sondland said.

Administration officials disputed parts of Sondland's testimony.

Pence's chief of staff Marc Short said the vice president never discussed the frozen aid with Sondland. "This alleged discussion recalled by Ambassador Sondland never happened," Short said.

State Department spokesman Morgan Ortagus said “Gordon Sondland never told Secretary Pompeo that he believed the President was linking aid to investigations of political opponents. Any suggestions to the contrary is flat out false.”

Pompeo twice ignored questions about Sondland's testimony in Brussels, where he's meeting with NATO allies. Asked if he had been "in the loop" at a press conference later in the day, he said, "I didn't see the testimony" but "I know precisely what American policy was with respect to Ukraine. I was working on it. And I'm incredibly proud of what we've accomplished."

A spokeswoman for the Department of Energy, Shaylyn Hynes, said Sondland “misrepresented both Secretary Perry's interaction with Rudy Giuliani and direction the Secretary received from President Trump. As previously stated, Secretary Perry spoke to Rudy Giuliani only once at the President's request. No one else was on that call. At no point before, during or after that phone call did the words 'Biden' or 'Burisma' ever come up in the presence of Secretary Perry.”

One of Sondland's Democratic questioners, Rep. Raja Krishnamoorthi of Illinois, told him Sondland was starting to look like "the one lonely amigo they're going to throw under the bus."

Trump backed a part of Sondland's testimony, while distancing himself from the ambassador who'd donated $1 million to his inauguration. “I don’t know him very well. I have not spoken to him much. This is not a man I know well. He seems like a nice guy though," Trump told reporters on the White House lawn.

He thenreferred to a part of Sondland's testimony where he testified that Trump told him in a phone call that he didn't want anything from Ukraine.

As he spoke,he held a pad with handwritten notes in black Sharpie that included the lines, "I want nothing," "Tell Zellinsky to do the right thing," and "This is the final word from the Pres of the U.S."

President Donald Trump holds notes on Ambassador Gordon Sondland's testimony as he departs the White House on Nov. 20, 2019. Erin Scott / Reuters

The Trump quotes were a reference to Sondland's earlier testimony about a Sept. 9 phone call, where Sondland asked him what he wanted from Ukraine. Trump told him nothing and "there's no quid pro quo," which Sondland said had not been a term he used. Democrats noted their conversation took place on the same day they'd opened up an investigation into the frozen Ukraine aid and after the White House became aware of a whistleblower complaint.

White House press secretary Stephanie Grisham said Sondland's testimony about the call "completely exonerates" Trump and "should be the only takeaway from today's sham hearing."

Sondland's 19-page opening statement — plus texts and emails not previously made public — was filled with new details and disclosures he omitted from both his over nine-hour closed-door deposition and a sworn declaration he made later. He said his memory had been refreshed by other witnesses' testimony, but could have been helped more if the White House had allowed him to access his records.

The email and text records Sondland provided to Congress on Wednesday corroborated some of his new account.

In one email to Bolton on Aug. 26, Sondland sent him a contact card for Rudy Giuliani, the Trump personal lawyer who drove the push for investigations into the Bidens and 2016. That email came days before Bolton traveled to Ukraine, and Sondland testified Bolton's office had "requested Mr. Giuliani's contact information."