BANGOR, Maine — A 66-year-old ill Litchfield man was sentenced Monday in U.S. District Court to 10 years in federal prison for unlawful transportation of child pornography via his computer.

U.S. District Judge John A. Woodcock also sentenced Gary A. Farlow to a lifetime of supervised release after his prison term. In addition, Farlow would be required to register as a sex offender.

Farlow, who appeared frail and had difficulty hearing during the sentencing, is suffering from liver disease, Federal Public Defender Virginia Villa told the judge. She urged Woodcock to sentence Farlow to a year and a day in prison.

Assistant U.S. Attorney James Moore, who prosecuted the case, urged Woodcock to sentence Farlow to 20 years, the maximum allowed under the law.

Farlow came to the attention of law enforcement in March 2007 when he chatted online with an undercover Nassau County, N.Y., police detective who was posing as a 14-year-old boy named Chris. He was convicted in New York of attempting to have sexual contact with a minor and attempted transportation of child pornography and sentenced to four years in prison, according to court documents.

The defendant was serving his sentence at a state facility in Rome, N.Y., when he was indicted in March 2009 by a federal grand jury in Bangor on 12 child pornography counts. In a plea agreement with the U.S. Attorney’s Office, Farlow pleaded guilty to one count in November. The other 11 were dismissed Monday after Woodcock imposed the 10-year sentence.

Earlier this year, Farlow completed his sentence in New York, according to court documents. He has been held without bail while awaiting sentencing on the federal charges at the Stafford County, N.H., jail, so his medical needs could be met.

On Tuesday, Moore said in a telephone interview that “given the poor condition of [Farlow’s] health, it was a fair sentence.”

Villa declined Tuesday to comment on the sentence.

Farlow faced a minimum of five years in federal prison and a maximum of 20.