A Maryland man who falsely claimed that he had served with the U.S. Special Forces — and made money providing counter-terrorism training to federal and state authorities — was sentenced Tuesday to 21 months in prison.

William G. Hillar, 66, earlier this year pleaded guilty to one county of wire fraud in connection with his long-running masquerade as a Green Beret combat veteran.

Hiller, of Millersville, claimed to be an expert on human trafficking and invented a story that his own daughter had been kidnapped, forced into sex slavery and killed by her captors before he could rescue her. He even said that the movie "Taken," starring Liam Neeson, was based on his experience.

“It is hard to imagine trying to trade on the sacrifices our armed forces have made,” federal prosecutors in Maryland wrote in court papers. “It’s even harder to imagine profiting off a fabricated tale of your own daughter’s abduction and murder by sex traffickers.”

Hiller, dressed in a medium-gray suit, white dress shirt and tie, apologized for his fabrications.

“I take full responsibility for what I did,” Hiller told U.S. District Judge William D. Quarles. “I apologize to those I have hurt or demeaned. I never intended to hurt anybody, and I'm sorry.”

Hiller said he was passionate about the subjects he taught, and many students assumed he had served in the military. “I never denied it.” he said. “And after some years, I actually adopted it. I know that was wrong.”

During the hearing, Jeff Hinton, a member of ProfessionalSoldiers.com, a fraternal organization of Green Berets, told Quarles that Hiller's conduct was "reprehensible."   Hinton said Hiller could have put law enforcement people who took his classes at risk, because he was not qualified to teach the subjects he lectured on.

Over the course of 12 years, Hillar was paid “at least $171,415 for teaching leading workshops, giving speeches and conducting training on counter -terrorism, drug trafficking, human trafficking and related topics,” according to a sentencing memorandum submitted by Assistant U.S. Attorney Leo J. Wise.

Among Hillar's clients were the FBI's Command  College, Salt Lake City and Chicago divisions, the Illinois State Police, the University of Oregon and the Monterey Institute of International Studies, according to court papers.

Quarles said Hillar would hear from the federal Bureau of Prisons by Oct. 31 where he would serve his time. Hillar, who was jailed for six weeks following his arrest in January, is free until then.