A gunman shot and killed a far-right Ukrainian politician who stirred controversy with campaigns to promote the Ukrainian language and discredit Russian-speaking compatriots, the authorities say.

The former lawmaker, Iryna Farion, was a highly divisive figure. A linguist who belonged to a hard-line nationalist party, she was despised by some for her denunciation of Russian-speaking fighters in elite Ukrainian military units. Many Ukrainians speak Russian, especially in eastern regions closer to Russia.

Ms. Farion, 60, was shot in the head by a young man on a street in the western city of Lviv on Friday evening, and the Ukrainian authorities said early Saturday that they were still searching for the gunman, who fled the scene. Ihor Klymenko, Ukraine’s interior minister, said he believed she was targeted for killing.

“This was not a spontaneous murder,” he told a news conference on Saturday, adding that it might have been politically motivated or a personal matter. He did not rule out possible Russian involvement.

Several former officials also said Moscow might have been behind the killing in an attempt to sow divisions, while other people raised fears that the shooting could polarize society. President Volodymyr Zelensky said on Saturday, “All versions are being investigated, including the one that leads to Russia.”

Mysterious deaths and assassinations were a feature of Ukraine’s political landscape before Russia’s full-scale invasion of the country in 2022. But there had been no sign of any high-profile killings or attempted assassinations since the war broke out.