NEW YORK — The former CEO of a once-popular male escort service website who pleaded guilty last year to promoting prostitution was sentenced to six months in prison Wednesday by a judge who said she wanted to send a deterrent message even though she knows the business helped people.

Jeffrey Hurant, who ran the Rentboy.com site, was sentenced by U.S. District Judge Margo K. Brodie in Brooklyn.

"The very thing that is illegal — there is no question it did a lot of good," Brodie said of the website as she also announced a $7,500 fine. "Almost two decades of committing a crime. That can't go unpunished."

Related: Rentboy.com CEO and Six Employees Arrested on Prostitution Charges

She noted the many positive letters sent to her on Hurant's behalf. "I am convinced you started the site for a good purpose," she said.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Hurant defended the business he said he ran openly for 20 years, saying many sex workers had told him that the website enabled them to work safely and independently after years of laboring in deplorable conditions.

Jeffrey Hurant, right, leaves federal court, Wednesday, Aug. 2, 2017, in Brooklyn, New York. Mary Altaffer / AP

"I disagree with the law I violated. I am obliged to follow it," he said. "My company mitigated many of the dangers of sex work."

Prosecutors sought at least a short prison term to deter operators of other escort services from similar misconduct, while his lawyers argued he deserves probation.

In letters to the court, lawmakers, civil rights organizations and other supporters cautioned that a tough sentence could send the wrong message to the gay community.

The case is troubling "because it harkens back to a dark chapter in our nation's history when the government used its vast resources to target and threaten LGBT adults by exposing their private consensual sexual activity," wrote state Sen. Brad Hoylman, a Manhattan Democrat.

Five New York City council members from the LGBT community also signed a letter arguing that "a harsh sentence will serve neither society nor the rehabilitation of Mr. Hurant." Other letters written last year by two Democratic congressmen from New York, Jerrold Nadler and Sean Patrick Maloney, to the Department of Justice and Department of Homeland Security questioned whether the agencies had wasted time and resources on pursuing a victimless crime.

Related: Ex-Rentboy.com CEO Near Plea Deal in Prostitution Case

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.

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

Homeland Security's involvement in the takedown, 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.