NBC NEWS - A police officer with the Washington, D.C. Metro transit system has been charged with providing support to ISIS, the first time a law enforcement officer has been accused of aiding the terror group, authorities said Wednesday.

Nicholas Young, 36, was arrested without incident at the transit agency's Washington headquarters and is due in court later today, law enforcement officials said.

Young is accused of purchasing 22 gift cards for mobile messaging apps to aid ISIS overseas, court records say. The FBI used an undercover informant to catch him.

He posed no credible threat to the Metro system, said Joshua Stueve, spokesman for the U.S. Attorney's office in Virginia's Eastern District. He was focused on aiding ISIS overseas, court documents say — not on an attack at home.

According to court records, he had been under scrutiny since as far back as 2009, when Metro officials reported suspicious behavior to the FBI.

Court records say he had Nazi sympathies and was a longtime supporter of Islamic extremism. He traveled to Libya in 2011, telling the FBI he fought with rebels seeking to oust dictator Muammar Gaddafi.

According to a criminal affidavit, Young met on 20 separate occasions with an FBI source posing as an ISIS fighter. Young advised the source on how to evade law enforcement detection, the document says.

Young faces a maximum of 20 years in prison if convicted.

Court records do not accused Young of working with others. By they say he was acquainted with two Washington area residents who have subsequently been convicted in terrorism cases.

The documents say Young knew Zachary Chesser, convicted in 2010 of providing support al Qaeda's affiliate in Somalia.

They also say he met with Amine El Khalifi, the year before he pleaded guilty to plotting a suicide bomb attack on the US Capitol. Khalifi was sentenced to 30 years in prison.

The case against Young is an example of the dilemmas confronting the FBI and other agencies as they hunt for ISIS domestic plots.

Officials admit he wasn't plotting an attack at home, and there would be no case against him at all had authorities not used an undercover informant who, according to court records, discussed an "obligation" to fight with ISIS.

Still, had the FBI not done that, and had Young become involved in violence, authorities would have come under hard questioning about all their interactions with him for years — including surveillance and multiple FBI interviews.

The Young case also shows the extent to which sympathies for violent organizations have spread into the far corners of society, including to a law enforcement agency in the nation's capital.