MOSCOW – Anti-Russian leader imprisoned Alexei A. Navalny on Friday ended a three-week hunger strike that embarrassed the Kremlin abroad and provoked protests at home.

The 24-day hunger strike, which Mr Navalny said had left him so thin that he looked like a “skeleton, waving, walking in his cell” became the latest fight in a weightlifting, Vladimir V. Putin and his most prominent domestic political rival.

Mr Putin also declined to name Mr Navalny, while police and prosecutors harassed his political organization with the arrest and, this month, called it a move to impose outright bans. Mr. Navalny is serving a prison sentence of more than two years for violating a sentence that he says was politically motivated.

But even in prison he managed to confuse Mr. Putin with a vigil: either accepting his demands for medical treatment by his private doctors or risking martyrdom.

Through the years, Mr. Navalny has run a highly effective investigative unit that has embarrassed Mr. Putin and discredited his government with him Stealth video Exposing corruption to the highest rank. He refers to Mr. Putin’s United Russia Party as a gang of “crooks and thieves”.

Mr. Navalny has continued to set the agenda for political opposition ahead of the parliamentary elections scheduled for the fall. His organization kicked out thousands of street protesters on Wednesday, stealing some headlines from Mr. Putin’s annual State of the Nation address.

Mr. Navalny said that he had stopped his hunger strike on the advice of his doctors and because his demands were partially met.

He announced a hunger strike on 31 March demanding access to treatment for health problems for his personal doctors, which probably stemmed from his poisoning with chemical weapons last year.

Mr. Navalny blamed the Russian government for stating that Novichok, a rare nerve agent manufactured only in Russia and the Soviet Union that broke before it, was kept in his underwear in a hotel room last August. At the time, he was organizing his political group for local elections. The Kremlin denied any role in toxicity.

Mr. Navalny was medically released from Germany in a coma, recovered and then returned to Russia in January, where he was arrested at the airport.

In prison, he reported pain and numbness in his legs and hands. This month, tests showed signs of possible renal failure that could cause an undiagnosed irregularity in Mr. Navalny’s heartbeat, his doctors said.

Prison officials never allowed entry for Mr. Navalny’s personal physician. They transferred him from his cell, first to a prison hospital and then to a civil hospital and this week the experts gave him permission to examine him.

“The doctors I have full faith in have achieved a lot to stop my fasting,” Mr. Navalny said in a statement released on his Instagram account on Friday. He said that doctors had also advised him that if he continued the hunger strike, “there would be no one left for treatment.”

Mr Navalny said he also broke his fast because some supporters declared a hunger strike in solidarity with him and did not want to endanger his health.

Mr. Navlani’s personal doctors released Statement On Thursday, prison officials who outlined health care were allowed after her transfer to a civilian hospital, which also included examinations by independent neurologists. Doctors said they had reached the results of their tests, partially meeting hunger strike demands.

The statement, signed by Mr. Navalny’s personal physician, Anastasia Vasileeva, and four experts said that he had not raised her request to personally examine Mr. Navalny. But enough was done, he said, to justify stopping the strike.

The extended hunger strike, though personally risky for Mr Navalny, has placed his case on the agenda of Western governments despite Russian military construction on the border with Ukraine.

The United States National Security Advisor, Jake Sullivan, said this month that the Russian government would face “consequences if Mr. Navalny died”. French Foreign Minister Jean-Yves Le Drian also expressed concern and put the Russian government in notice: “President Putin has a big responsibility here,” he said.

In domestic politics, Mr. Navalny’s hunger strike and deteriorating health led to street protests in cities across Russia on Wednesday.

The protests brought riot police officers into Russian cities by force one day, when Mr Putin intended to highlight an optimistic message of economic development in the nation’s own state, as the country emerged from a coronovirus epidemic. By the end of the day, police had detained around 1,500 protesters across the country.