Two Roxbury men have been convicted of exploiting women under the state’s human trafficking law, marking the first convictions under the new legislation, authorities said Friday.

Tyshaun McGhee, 33, and Sidney McGee, 29, each were convicted Thursday of three counts of trafficking a person for sexual servitude, Suffolk District Attorney Daniel F. Conley’s office said. McGhee was further convicted on two counts of deriving support from prostitution. They were both acquitted on counts of aggravated rape, prosecutors said.

Both men face up to 20 years in state prison, prosecutors said.

Advertisement - Continue Reading Below

Authorities say the two men recruited drug-addicted women in September 2012 to work for a prostitution website they were operating. They promised the women narcotics and money, and coerced them into sexual activity for a fee with men who responded to the defendants’ online advertisements. McGee and McGhee then kept the money for themselves, prosecutors said.

“This was anything but a victimless crime,” Conley said in a statement Friday. “These women were homeless, drug-dependent, and vulnerable. The defendants ruthlessly exploited them through prostitution. This case is a perfect example of why we fought so hard for a human trafficking statute in Massachusetts, and why our enforcement efforts today target pimps and johns.”

Both victims testified that the men approached them outside medical facilities, offered them drugs, and then brought them to McGhee’s home. They were recruited separately, prosecutors said.

The women were posed in lingerie and photographed. The pictures were posted online, prosecutors said.

Both victims said they were brought to a Eustis Street residence in Roxbury owned by Fard Ahmed, 76, where they participated in acts of prostitution in exchange for cash.

Ahmed is also being charged with human trafficking for allegedly allowing his property to be used for prostitution.

The two women escaped in late September 2012 and reported the abuse. This triggered an investigation by the Boston police human trafficking unit and the DA’s sexual assault unit. Both men were indicted in December 2012 and have been held on high bail since then.

The defendants are to be sentenced Monday morning in Suffolk County Superior Court.

Massachusetts’ human trafficking statute was enacted in 2011. Conley and Attorney General Martha Coakley helped to draft the legislation.

Since then, Conley has adopted a “safe harbor” policy for prostituted youth, treating them as victims of exploitation, rather than offenders. This was later mandated statewide.