BEIJING -- China executed a man on Tuesday who kept six women in a dungeon as sex slaves for periods of up to 21 months, during which he coerced three of them to kill two of their fellow captives, a court official said.

One of the three was later sentenced to three years in prison for her part in the deaths.

Executed Li Hao, 36, had dug a dungeon underneath a basement he bought in August 2009 and tricked women who worked at hair salons, karaoke bars and a massage parlor into going there with him, the official Xinhua News Agency reported.

Get Breaking News Delivered to Your Inbox

Li repeatedly raped the women, who were held there between two and 21 months, it said. Police said he wanted to make money by forcing the women into prostitution and appear in obscene webcasts.

His dungeon in Luoyang city in central Henan province was finally discovered after one of the women escaped and went to police.

The two women who died were killed by three of the others on Li's instructions, and were also found guilty of murder, according to Xinhua, which said they were shown leniency. One of the women, whose surname was given as Duan, was found to have killed both women and sentenced to three years in prison, while the other two were put on probation, Xinhua said.

When Li was arrested in September 2011, he was a married man with an 8-month-old son. He had built the dungeon in a residential complex away from his home, according to reports at the time. Li was a clerk with the Luoyang technical supervision bureau, a government department which deals with quality control.

Xinhua said he was convicted of murder, rape, illegal detention, organized prostitution and manufacturing pornography for profit. He was sentenced to death in November 2012, as well as being deprived of his political rights and fined 10,000 yuan ($1,640).

Li forced the women to appear in obscene webcasts from March to April 2011 and forced them to have sex with "customers" from late August to early September of that year, Xinhua said.

An official from the Henan High Court, who refused to give her name, confirmed Li's execution and the Xinhua report.