WASHINGTON — The Associated Press has learned that President-elect Donald Trump’s choice for defense secretary was among several military officials whom the FBI concluded received anonymous letters from the woman who had an affair with then-CIA Director David Petraeus. The affair led to Petraeus’ downfall.

Letters from the woman to now-retired Marine Gen. James Mattis and others warned them to stay away from a Florida socialite. The letters led to the discovery of the affair and revelations that Petraeus had shown his lover classified secrets.

According to an FBI report and a U.S. official, agents interviewed Mattis, who said he always had proper interactions with the socialite.

The official was not authorized to discuss the investigation publicly and spoke on condition of anonymity. Trump is considering Petraeus for secretary of state.