WASHINGTON — The Department of Justice inspector general says he has recovered missing text messages from two senior FBI officials who investigated both Hillary Clinton and Donald Trump and exchanged notes critical of the president.

In a letter to congressional leaders, Inspector General Michael Horowitz said his office “succeeded in using forensic tools” to recover messages between senior FBI agent Peter Strzok and FBI lawyer Lisa Page during a key five-month period ending the day special counsel Robert Mueller III was appointed to investigate possible coordination between the Kremlin and Trump’s campaign. The missing messages have sparked a political firestorm in recent days, as Republican leaders and the president have questioned how the FBI failed to retain them.

Horowitz’s letter did not indicate how many messages were recovered and said his effort to locate more was “ongoing.” He said he would provide copies to the Justice Department, and he would have no objection if leaders there turned them over to Congress if they felt it was appropriate. A Justice Department official has said that the FBI failed to save text messages sent from thousands of cellphones, including Page’s and Strzok’s.

The letter was sent to Sen. Charles Grassley, R-Iowa, chairman of the Senate Judiciary Committee, and Sen. Ron Johnson, R-Wis., chairman of the Homeland Security Committee.

Horowitz has been investigating Strzok’s and Page’s conduct as part of his office’s investigation into the handling of the probe into Clinton’s use of a private email server when she was secretary of state. Both Page and Strzok worked on the Clinton case and the probe, led by Mueller, into whether agents of Russia may have coordinated with Trump associates to try to meddle with the 2016 presidential election.

On Thursday, Grassley released some previously recovered texts from the pair discussing the Clinton case – calling into question whether she had been treated too gently. In one February 2016 exchange in which the two are talking about the number of agents and prosecutors involved, Page notably remarked of the former secretary of state: “One more thing: she might be our next president. The last thing you need us going in there loaded for bear. You think she’s going to remember or care that it was more doj than fbi?”

In March 2016, Strzok and Page seemed to discuss the possibility of Patrick Fitzgerald, a former federal prosecutor now in private practice, being appointed as a special counsel to oversee the matter.

In a set of messages exchanged Oct. 28, 2016, Page and Strzok discussed Page’s boss, deputy director Andrew McCabe, and an upcoming story in the Wall Street Journal documenting concerns inside the FBI about his oversight of investigations into Clinton and the Clinton Foundation.

Page texted that James Rybicki, the chief of staff to then-FBI director James Comey, “clearly 100% believes that Andy should be recused because of the ‘perception’.” Strzok replied “God,” and the two expressed bafflement that the FBI would reverse its position on the matter. At the time, the FBI had publicly defended McCabe and said there was no reason to recuse.

Grassley wrote in a letter that the messages “raise serious concerns about the impartiality of senior leadership running both the Clinton and Trump investigations.”

The Washington Post reported in December that Strzok was removed from the Trump probe back in July after internal investigators discovered he and Page, who were romantically involved, exchanged anti-Trump, pro-Clinton texts during investigations of both political figures.