DETROIT (AP) — A former federal official accused of accepting bribes to release illegal immigrants pleaded guilty Tuesday to corruption charges.

Roy M. Bailey pleaded guilty to conspiracy to commit bribery, conspiracy to defraud the United States and failing to report a felony. Under the plea agreement, Bailey faces up to 37 months in prison and a $75,000 fine when he is sentenced Nov. 21.

Bailey, who was placed on leave in 2004 and later retired, oversaw the custody of illegal immigrants as acting director for detention and removal operations in the Detroit office of U.S. Immigration and Customs Enforcement.

Bailey was indicted last year. Prosecutors accused him of accepting money and gifts in exchange for releasing immigrants awaiting deportation. Prosecutors said one person Bailey illegally released, Bashar J. Faraj, was later convicted of murder.