The strikers, among 6,500 Palestinians in Israeli prisons, had demanded more family visits, an end to solitary confinement, better health care and greater access to education. Media reports said the Israeli authorities had agreed to prisoners’ demand for a second monthly family visit.

Israeli officials accused Mr. Barghouti of staging the strike to raise his position in the volatile struggle over leadership among Palestinians. Polls show that Mr. Barghouti, 57, who has been in prison since 2002, is the most popular choice to replace Mahmoud Abbas, 82, president of the Palestinian Authority.

Mr. Abbas met in the past week in Bethlehem with President Trump, and the two reportedly discussed the strike. The striking prisoners had limited themselves to water and salt, although Israeli officials said that Mr. Barghouti had violated the strike at least twice, eating snacks placed in his cell. Palestinian officials and his family denied the accusations, saying that videos purportedly showing Mr. Barghouti eating were faked.