A New York City man pleaded guilty in federal court in Bangor on Wednesday to conspiring and attempting to interfere with commerce by robbery, according to the U.S. attorney for Maine.

In July 2016, Hector Munoz, 52, and others conspired to commit a robbery in Rangeley and steal controlled substances from a residence in town, U.S. Attorney Halsey B. Frank said in a news release.

According to court records, on July 28, 2016, Munoz and an unnamed co-conspirator entered the residence intending to take the controlled substances by using actual and threatened force, violence and fear of injury. The two were armed with knives and a baseball bat during the attempted robbery.

Munoz faces up to 20 years in prison and a $250,000 fine for the two charges. He will be sentenced once a presentence investigation report is completed by the U.S. Probation Office.

The case was investigated by the U.S. Drug Enforcement Administration, the Franklin County Sheriff’s Office, the Bureau of Alcohol, Tobacco, Firearms and Explosives, the Maine State Police, and the Rangeley Police Department with assistance by the Maine Office of the Attorney General.