NEW DELHI — By licking a dab of honey from her palm, one of India’s most prominent activists ended a nearly 16-year hunger strike on Tuesday as she pledged to run for political office in her restive home state of Manipur.

The activist, Irom Chanu Sharmila, was held for years in judicial custody, refusing to eat in protest of the Armed Forces Special Powers Act of 1958, a law that shields members of the military from prosecution in conflict-ridden parts of India.

A judge granted her bail on Tuesday after she said she intended to end her strike, releasing her from the hospital where she had been force-fed through a tube in her nose to keep her alive.

“Politics is so dirty and everybody knows it,” she told reporters at a news conference in Imphal, the state capital.