A would-be bank robber pleaded guilty in federal court Wednesday to calling in a bomb threat last summer that shut down the University of Louisiana at Lafayette — a threat that was meant to divert police from a planned bank robbery.

Devin Haywood faces up to 10 years in prison for conveying false information about a bomb in Girard Park on July 16, 2014. He also pleaded guilty to attempted bank robbery. He faces up to 20 years for trying to rob a bank branch on Moss Street while police were busy looking for a bomb near the campus.

Haywood, who served eight years of a 10-year jail sentence for a bank robbery in Gretna in 2005, was on parole at the time of the offenses.

U.S. District Judge Richard Haik on Wednesday did not set a sentencing date. Haywood, 31, is being held at the St. Martin Parish Correctional Center.

The bomb threat forced the closure of UL-Lafayette, which was conducting summer school classes and hosting high school students taking part in events on campus. The university resumed classes the next day.

Haik, reading from a document crafted by prosecutors and signed by Haywood, said Haywood called KATC Channel 3’s news department about 5:30 a.m. to report that a bomb had been planted in Girard Park.

Police later discovered the device had soap instead of an explosive substance inside, Haik said.

Haywood used the threat as a ruse to occupy police agencies while he tried unsuccessfully to rob a branch of MidSouth Bank on Moss Street that morning. The attempt failed after two bank employees, who drove up to open the business, spotted Haywood crouched behind an air conditioner, holding what appeared to be a handgun. The gun turned out to be a toy. A video captured Haywood’s hapless attempt to rob the bank, including his running pursuit of the car and its occupants as it sped off.

After the robbery failed, Haik said, Haywood ran to nearby Sts. Leo-Seton Catholic School and threw onto the school’s roof a bag containing zip ties and one of two gloves Haywood wore that morning. Police later matched DNA from the glove to Haywood.

Haik asked Haywood if he was surprised that DNA from the glove was linked to him. “No, sir,” Haywood said.

Police also linked the called-in threat to a cellphone Haywood bought at a Wal-Mart off Evangeline Thruway the day before the threat.

On the morning of the bomb threat, police quickly found what appeared to be an explosive device in a trash can in Girard Park. The device turned out to be harmless.

Further reports of another device located somewhere on UL-Lafayette’s vast campus also turned out to be false, but not before local, state and federal law enforcement with bomb-sniffing K-9s swept the campus near Girard Park and also at Cajun Field.

The searches closed off sections of Johnston Street, St. Mary Boulevard, South College Road, West Pinhook Road, University Avenue and roads going through Lafayette’s Oil Center near Girard Park, disrupting traffic throughout Lafayette.

Students, who were sent text alerts by UL-Lafayette officials that morning, were bused away from campus or told to stay away.

“Actions of this defendant created a very dangerous situation within the city of Lafayette,” U.S. Attorney Stephanie Finley said in a news release following Haywood’s plea.

“Law enforcement, emergency responders and others were called away from the important work to respond to a fabricated bomb threat,” Finley said.