Army civilian police Capt. Andrew Poulos Jr. helped bust a counterfeiter last year who produced templates for federal law enforcement credentials and sold them over the Internet.

Then he launched a second investigation, using the fake credentials and fraudulent badges to penetrate security at two federal courthouses, three state buildings and six military installations. The Army gave him a commendation and a cash bonus and published his findings in a terrorism bulletin to other federal agencies.

"Keep up the great work to keep our Armed Forces safe and our posts secure," Denis P. McGowan of the Federal Protective Service, which is responsible for security at federal facilities, wrote in an e-mail.

But now the investigator is being investigated.

The U.S. Marshals Service, which is responsible for security at federal courthouses, complained to the Army that Poulos's investigation was "inappropriate, impermissible, and not taken lightly," according to e-mails obtained by The Washington Post.

The Army Criminal Investigation Command, which had previously highlighted Poulos's work, then launched a criminal investigation of the captain.

In January, Poulos, 33, was relieved of his command and stripped of his national security clearance. Investigators searched his office, forcing his door open.

"This is all because the captain embarrassed the U.S. Marshals Service with his findings, which show a critical weakness in our national security," said a law enforcement source close to the investigation who spoke on the condition of anonymity because he feared losing his job.

An official with the Marshals Service said he alerted the Army because the police captain's action could have resulted in "deadly" consequences.

"The unauthorized entry of a court facility while carrying a weapon and impersonating law enforcement could be a violation of rules, regulations, policy or law," Michael J. Prout, assistant director for judicial security in the Marshals Service, said in a telephone interview. "For that purpose, once this was disclosed, the Marshals Service advised the U.S. Army of this incident and requested they examine it."

"The Marshals Service is not embarrassed," Prout said. "The Marshals Service is concerned about the security of its facilities."

Sources close to the investigation say Poulos's work was authorized by his superior, John A. Hazel, director of emergency services at Fort Monmouth, N.J. Hazel declined to comment.