A Maryland man is going to prison for posting nude photos of his ex-wife on the Internet.

Queens District Attorney Richard A. Brown says Thomas Gillen, of Hagerstown, Maryland, has been sentenced to 2 1/2 to 5 years in prison. The prosecutor says the former Queens resident had pleaded guilty to identity theft and criminal contempt.

Brown says Gillen admitted that he created an Internet account in his ex-wife's name and used it to contact men and engage in racy conversations. Gillen also sent them nude photos of her and posted some online.

The DA says Gillen admitted that he impersonated his former wife on the Internet 1,577 times between November 2007 and July 2008.

Gillen was arrested on similar charges in 2006 and was sentenced to five years' probation.