MOSCOW — A top Ukrainian presidential aide, Serhiy Shefir, narrowly survived assassination when one or more attackers opened fire on his car with a barrage of at least 18 bullets Wednesday.

The attack took place on a forested stretch of road near Lesnyky village, outside Kyiv, the country’s capital. President Volodymyr Zelensky, who was in New York at the time of the attack, announced he would return to Kyiv after addressing the United Nations General Assembly later Wednesday.

Dozens of police fanned out to comb the area of the attack for clues.

Shefir, 57, who was not injured in the attack, is close to the president and was the producer on the TV comedy show “Servant of the People,” in which Zelensky starred before being elected president in 2019.

He and Zelensky were born in the same industrial city, Kryvyi Rih. They and others co-founded the production company that made the comedy show about a humble and honest man who becomes president.

National Police Chief Ihor Klymenko said police were pursuing three main lines of investigation — that Shefir was attacked because of his state duties, that it was an attempt to put pressure on the country’s top leadership or that it was an effort to destabilize the political situation in the country.

“Among other things, the involvement of foreign special services is under scrutiny,” he said at a news conference.

From New York, Zelensky promised journalists a strong response.

“Frankly speaking, I don’t know who is behind this, for now, what kind of forces are maybe involved in this, internal or external. But I don’t consider them forces, because it is weakness to send me a message with shots from the forest into my friend’s car,” Zelensky said.

The Ukrainian president has undertaken several difficult reforms, including trying to clean up the country’s corrupt judicial system and diluting the sweeping power of the billionaire oligarchs over the economy.

Shefir’s driver was hit three times in the shooting but survived and was hospitalized. Shefir told a news conference that the driver saved both their lives by continuing to drive for some distance despite being shot and that a tire was punctured in the attack.

“I think he was badly wounded. He was in great pain,” Shefir said. “This is a heroic act. At first, in shock, he tried to stop, but I think if we had stopped then, we would not be talking to you now. I said, ‘Drive,’ and we drove off.”

Shefir said he drives himself to work most of the time but will start traveling with a security detail.

Interior Minister Denys Monastyrsky told the news conference that the gunfire was intended to stop the car. If it was stopped after 50 or 100 meters “the consequences would have been unequivocally tragic. The fact that the driver left the zone of fire was what saved his life,” he said.

Mykhailo Podolyak, an adviser in the presidential administration, said the attack could have been designed to deter Zelensky’s attempts to limit the power of the oligarchs.

“This policy aims to palpably reduce the traditional influence of [oligarchs] on social processes and to destroy the political and financial groups that openly serve our foreign opponents,” Podolyak told Interfax Ukraine.

In May, Ukraine’s prosecutor general indicted powerful pro-Kremlin oligarch Viktor Medvedchuk, a close ally of Russian President Vladimir Putin, on charges of treason, and a court placed him under house arrest.

Oleksandr Kornienko, the head of Zelensky’s political party, said Russian involvement was possible.

“A Russian trace should not be absolutely ruled out. We know their ability to organize terrorist attacks in different countries,” he told reporters.

Kremlin spokesman Dmitry Peskov told journalists that speculation about Russia possibly being behind the attack had “nothing to do with reality.”

Zelensky, meanwhile, vowed to press ahead with his reforms undeterred.

“It does not affect the strength of our team, the course that I have chosen with my team — to change, to clean up our economy, to fight crime and large, influential financial groups,” he said, adding that the Ukrainian people had given him a mandate for change.

Zelensky came to power promising to end a war in eastern Ukraine, where Russian-backed separatists broke away in 2014, but peace talks involving Russia have stalled.

He has been pushing for NATO membership without progress. Ukraine faced a massive Russian military buildup on its borders this year, with Moscow making clear it would not tolerate Ukraine joining the Western military alliance.