Eleven people were arrested in a Pleasanton hotel prostitution sting on Thursday, police said.

The sting happened in a hotel at 4833 Bernal Ave.

Undercover officers used a fake profile to create an online ad to lure sex purchasers seeking prostitution services, police said. In the 8-hour operation, over 40 people responded to the ad.

Ten men agreed to pay for sex and went to the hotel where the undercover sting happened, authorities said.

One of the men thought he was meeting a 15-year-old girl.

Another man tried to act as the undercover officer’s pimp, police said. He then offered protection and other services in exchange for a portion of the proceeds.

Only one of the 11 men arrested are from Pleasanton residents. Their charges include solicitation of prostitution, resisting arrest, pandering, and meeting with a minor with the intention of engaging in lewd or lascivious behavior.

All 11 people were booked into Santa Rita Jail.

Livermore and Hayward police helped in the sting.