WASHINGTON — Secretary of State Mike Pompeo has for months deflected questions about whether the Trump administration demanded political favors from Ukraine in exchange for military aid. He has refused to explain why he recalled the American ambassador, declared that it was “inappropriate” for his diplomats to testify before Congress and declined to hand over documents to impeachment investigators.

On Wednesday, Gordon D. Sondland, the American ambassador to the European Union, filled in the blanks: He said Mr. Pompeo and his top aides “knew what we were doing, and why,” and recited emails he wrote to Mr. Pompeo about the quid pro quo demanded by President Trump. “Everyone was in the loop,” Mr. Sondland said.

Mr. Sondland’s testimony has undercut any notion that Mr. Pompeo, the administration’s most powerful national security official, was not a participant in Mr. Trump’s efforts to pressure Ukraine. It also firmly places him at the center of one of the nation’s biggest foreign policy controversies in nearly two decades, since the debate over the intelligence that led to the war in Iraq.

Whatever Mr. Pompeo’s future plans, Mr. Trump’s secretary of state is now tied intimately to the Ukraine controversy. Even before Mr. Sondland’s testimony, Mr. Pompeo was rumored to be seeking an exit from the State Department, perhaps to run for a Senate seat in Kansas, his adopted home state, with an eye toward a presidential bid once Mr. Trump leaves the stage.