Scott Ritter denies the charges against him

A former UN weapons inspector is facing charges of unlawful sexual contact with a minor after being caught in an online sex sting, court officials have said.

Scott Ritter, an outspoken critic of the war in Iraq, is alleged to have exchanged sexual messages with a police officer posing as a 15-year-old girl.

The 48-year-old, who resigned in 1998 after seven years as a weapons inspector, has denied the charges.

A court official said the charges were made against Mr Ritter in January.

The charges have been filed with a local court in Pennsylvania though Mr Ritter lives in New York state.

"The allegations are that the defendant exposed himself and performed a sex act over a webcam," Deputy Assistant District Attorney Michael Rakaczewski, of Monroe County, Pennsylvania, told the BBC.

He confirmed that Mr Ritter was freed on bail after a preliminary hearing on 17 December. A trial is expected to begin in March, he said.

If found guilty, Mr Rakaczewski said, the former weapons inspector could face up to seven years in jail.

Officials say they traced the exchange using a mobile phone he gave them, reports say.

Mr Ritter declined to comment Thursday to reporters outside his home, AP news agency said.