NEW YORK — The chief executive officer of a once-popular male escort website pleaded guilty on Friday to promoting prostitution in a federal case that prompted accusations of anti-gay bias.

Jeffrey Hurant admitted in federal court in Brooklyn that he broke the law by promoting “the exchange of sexual conduct in return for a fee” on his site.

Under a plea deal, Hurant agreed not to appeal a sentence of two years or less in prison. His company also cannot appeal a penalty of $10 million or less. Sentencing guidelines call for a maximum sentence of 21 months.

Hurant, 51, and his attorney left court without speaking to reporters. Sentencing was set for Feb. 2.

Prosecutors had alleged that Rentboy was the equivalent of an online brothel, and what the site called escorts were actually prostitutes. They said part of the proof were in the explicit ads that featured nude photos, listings of all manner of physical attributes and pricing options ranging from $150 an hour to $3,500 for a weekend.

The takedown of the website was led by the U.S. Department of Homeland Security. Its involvement, along with an absence of any allegations that Rentboy was a menace to society beyond simple prostitution — like engaging in human trafficking or exploiting minors — stirred anger and fear in the gay community. Activists questioned why the agency would single out Rentboy when other escort websites, gay or straight, continue to do business.

U.S. Immigration and Customs Enforcement, which participated in the investigation along with the New York Police Department and other agencies, issued a statement saying “any insinuation that a specific population was targeted is categorically false.”

Before authorities arrested Hurant and seized the Rentboy site, it had thousands of advertisers paying up to $300 a month, 500,000 visitors a day and revenues of $10 million in the past five years.

The business hosted parties and an annual awards show for escorts called the Hookies. In interviews, Hurant insisted “there is no place on this website where somebody says I’ll have sex for money because that is against the law,” but also boasted about wanting “to keep the oldest profession in the world up to date with all the latest technology.”