The C.I.A. director traveled to Ukraine this month to meet with Ukrainian intelligence officials and President Volodymyr Zelensky, according to a U.S. official.

William J. Burns, the C.I.A. director, was in Kyiv, the capital, to discuss the United States’ continued intelligence cooperation with Ukraine, and reinforce Washington’s support in the war against Russia, the official said. The official spoke on the condition of anonymity to discuss the director’s travel, which is kept secret.

American intelligence has been critical to helping the Ukrainians target Russian arms depots behind the front lines, attack command and control nodes, and find weaknesses in Russian defenses that Kyiv has exploited in its counterattacks.

It is not clear how many trips to Ukraine Mr. Burns has made, although he traveled to Kyiv immediately before the invasion with a stark warning to Mr. Zelensky to shore up the defenses of the capital.

That trip, officials have said previously, helped the Ukrainians improve their defenses at the nearby Hostomel airport and repel an attack by elite Russian airborne troops.

There have been some tensions between Ukraine and the United States over Kyiv’s covert attacks inside Russia and its strikes in Crimea, the peninsula that Moscow illegally annexed from Ukraine in 2014. Some American officials believe the covert campaign is a distraction from the effective Ukrainian counterattack in the south and northeast.

Still, despite those tensions, American officials have said that cooperation with Ukraine continues and that relationships between senior American leaders and their Ukrainian counterparts remain strong.