MILFORD, Massachusetts -- Five men were released without bail in Milford District Court yesterday on a single charge apiece of sex for hire after police arrested them in a sting operation.

The men allegedly consulted craigslist, the popular online site, to find sex for a fee. Instead, they allegedly encountered a female state trooper posing as a prostitute.

One of the men, a Newton Highway Division employee, could face disciplinary charges because he allegedly used an official city car for the assignation.

Milford police Lieutenant James Falvey, head of detectives, said he had ordered the sting in an effort to keep prostitutes out of town. Police conducted a similar sting last March and made four arrests.

''They're advertising, and they're willing to travel," Falvey said. ''We don't want them to travel to Milford."

Jim Buckmaster, craigslist's CEO, said in an e-mail message yesterday that he could not comment on an ongoing police investigation, but that ''craigslist strictly prohibits all illegal activities on the site, including sex-for-hire."

Falvey said that after noticing a section of craigslist labeled ''Erotic" apparently included women advertising sex for hire in Milford, he ordered his detectives to post an ad. The ad gave a physical description of a female state trooper who acted as a decoy, and an e-mail address that police monitored.

''We started getting swamped with e-mails," Falvey said.

On Wednesday, he said, several men contacted the trooper by cellphone and found her at a prearranged location near the intersection of Beaver Street and Medway Road, an area of strip malls, fast-food joints, and a couple of hotels.

The arrests occurred after the men allegedly specified the kind of sex they sought and the fees, ranging from $75 to $125, according to court documents.

The Newton employee was placed on paid administrative leave pending an internal investigation, said a city spokesman.

All five defendants, who live in Methuen, Franklin, Waltham, and Leicester, pleaded not guilty.