ALBANY, N.Y. – The state Medicaid program paid more than $60,000 for sexual and erectile dysfunction drugs for 47 sex offenders, according to an audit by State Comptroller Thomas P. DiNapoli.

In total, Medicaid paid more than $930,000 in payments for erectile dysfunction drugs and treatments that are barred by state and federal law.

“There are clear rules about what conditions Medicaid will cover when it comes to erectile dysfunction drugs,” DiNapoli said in a prepared statement. “And paying for sex offenders who’ve committed terrible crimes to get these drugs should never be lost in the bureaucratic administration of the program.”

In 2005 the comptroller’s office found that Medicaid paid for the erectile dysfunction drug Viagra for 198 people registered as level-3 sex offenders. That discovery sparked an overhaul of legislation at the federal and state levels to prohibit Medicaid from paying for these drugs.

State law also prohibits Medicaid for paying for procedures and other supplies to treat ED for registered sex offenders.

In 2011 the management of pharmacy benefits for many Medicaid enrollees was transferred from the state Health Department to managed care organizations.

DiNapoli’s audit found Medicaid managed care organizations are not always policing drugs enrollees can get. It also found the health department did not monitor the use of ED drugs.

The health department disputed the audit’s findings. It said erectile dysfunction drugs can also be used to treat enlarged prostate and high blood pressure in the lungs.

But DiNapoli’s office said the improper payments identified by the audit were for drugs approved by the FDA to treat ED – not enlarged prostate and high blood pressure in the lungs.