A New York man, who was arrested for agreeing to have sex with an undercover officer, has reached a $450,000 (£267,000) out-of-court settlement.

Robert Pinter, 58, was arrested for prostitution in a gay video shop in 2008, as one of over 40 gay entrapment cases thrown out as ‘nuisance arrests’.

He was arrested in Blue Door Video, an adult video store, after agreeing to have consensual sex with a younger man.

As the pair were leaving the store, the younger man, who turned out to be an undercover police officer, offered to pay for the sex, and before he could respond Pinter was arrested.

The case against him was dismissed, and several other prosecutions based on similar arrests were thrown out or dropped.

According to Gay City News, some of the men were arrested despite agreeing to consensual sex and refusing the offer of money, while others said they never even agreed to have sex.

The news site reports the nuisance arrests were part of efforts to close down the porn shops in the city.

Other men reached settlements with the city in 2011 over the wrongful arrests, with three receiving $45,001 (£26,700)in compensation, and one receiving $25,001 (£15,000).

Other lawsuits over vice arrests in the period are still ongoing.

Six New York City council members had previously urged settlement in the case, writing: “[The] lawsuit involves insidious entrapment of a gay man.

“Such policing tactics, especially when a gay man is involved, bring up very painful memories of an oppressive time in this country when such actions were even more widespread.”