ALEXANDRIA, Va. — A former ABC News investigative journalist pleaded guilty Friday to federal child pornography charges.

James Gordon Meek, 53, of Arlington, Virginia, admitted in US District Court in Alexandria that he unlawfully possessed and transported child pornography. He covered national security issues for the network until he stepped down last year.

Court documents indicate that the investigation began when the FBI received a Dropbox tip about videos showing the sexual abuse of children on an account associated with Meek.

As part of a plea agreement, Meek admitted that he used an iPhone to exchange child pornography, including a video showing the sexual abuse of a baby, during a chat session with two other people.

An FBI affidavit says agents found dozens of images and videos of child pornography when they searched Meek’s home last year, going back to at least 2014.

The affidavit says evidence was also seized showing that Meek used Snapchat and other apps to pressure minors to send him sexually explicit images, and that Meek sometimes portrayed himself as a girl in some of those communications. Those accusations are not explicitly mentioned in her plea agreement.

Meek’s lawyer had argued unsuccessfully that the evidence was obtained illegally and should have been thrown out. The plea agreement preserves Meek’s right to file an appeal to have the evidence dismissed.

If he is unsuccessful in his appeal on the search and seizure issue, Meek will be sentenced in September and faces up to 40 years in prison, though a maximum sentence is unlikely. One of the positions carries a mandatory minimum of five years.

Meek joined ABC News’ Washington bureau as an investigative producer in 2013. He previously worked for the New York Daily News and also served as a senior counterterrorism adviser and investigator for the US House Homeland Security Committee.

Meek’s abrupt resignation and the FBI’s search of his home sparked misguided speculation last year that he had been targeted for his work as a journalist.