MOSCOW — Aleksei A. Navalny, the imprisoned Russian opposition leader, announced Friday he has ended a more than three-week hunger strike on the recommendation of his doctors, saying he had partially achieved his goals.

Isolated behind prison walls and with his health failing amid fears of lingering effects from a poisoning with a chemical weapon last year, Mr. Navalny had demanded treatment from doctors of his choosing. He began the hunger strike on March 31.

Prison authorities never allowed access for Mr. Navalny’s personal doctor. They did provide medical treatment, first at a prison hospital then a civilian hospital, and then this week allowed specialists to examine him.

“Doctors whom I fully trust made a statement that we have achieved enough for me to stop my fast,” Mr. Navalny said in a statement posted on his Instagram account.

Medical treatment has become a pivotal political issue for Mr. Navalny and his movement. He narrowly survived the poisoning last year, which he blamed on the Russian government. The Kremlin has denied any role.

After he returned to Russia following treatment for the poisoning in Germany, he was arrested on a parole violation for a conviction he dismissed as being politically motivated. He is currently serving a two-and-a-half-year sentence.

His supporters say he is now at risk of dying from ill-treatment in prison.

Mr. Navalny said doctors had advised him to halt his hunger strike because, if he continued, “there will be nobody left to treat.”