MOSCOW (AP) _ A Ukrainian legislator who was arrested for allegedly assaulting a KGB agent has ended a political hunger strike after 13 days, according to news reports.

The legislator, Stepan Khmara, has become focus for anti-government protests in the Ukraine ever since his arrest on Nov. 17. Demonstrators at a human rights rally in Moscow on Dec. 8 demanded his release from prison, and his case has been championed by nationalist groups in the Ukraine.

Keston College in Britain, which monitors religious affairs in the Soviet Union, reported Khmara was in critical condition and being treated by doctors after ending his hunger strike Thursday. The Tass news agency on Friday also reported he had ended the hunger strike.

According to Keston College, Khmara's arrest stemmed from an incident Nov. 7 when he stopped to help a woman who said she had been attacked by a man near a Kiev underpass. Khmara asked the man who he was and the man didn't reply, although he later turned out to be KGB Col. Igor Grigoriev.

Ukrainian prosecutors allege Khmara beat and robbed Grigoriev, who reportedly still is hospitalized, and the Communist majority in the Ukrainian parliament voted to deprive Khmara of his parliamentary immunity from prosecution, Tass said.

Khmara was charged with ''abusing the authority of his office,'' according to Keston College, and he began the hunger strike Nov. 26 in Lukianivka Prison to protest his arrest.

Parliamentary opposition groups, including the nationalist group Rukh, began picketing the prison where Khmara was incarcerated, Tass reported.

Khmara, who has been active in the struggle for the legalization of the Greek-Catholic church in the Soviet Union, called off his hunger strike at the request of a clergyman, Vlodimir Sterniuk, according to Keston College. The legislator reportedly was moved from the prison infirmary to the General Military Hospital.

Tass did not report on his condition Friday.