SEOUL, South Korea — South Korean police on Tuesday detained a 25-year-old graduate student for allegedly placing a concealed explosive device that injured a professor at a university office in Seoul.

An official from Seoul’s Seodaemun district police station said the suspect confessed after being tracked down by police who examined security video and secured some of the tools he allegedly used.

Police are questioning the suspect over the motive in the attack on the professor in Yonsei University’s mechanical engineering department, who was being treated for burns to his hands and neck but avoided serious injury. The suspect is a graduate student in the same department, said the police official, who didn’t want to be named, citing office rules.

The crudely made device used explosive powder, four batteries and dozens of bolts that were packed inside a vacuum bottle, which exploded when the professor opened the bottle on Tuesday.

The professor found the bottle in a box that was inside a shopping bag hung on his office door. Police said it seemed that the device didn’t go off as planned as it just burned the explosive powder without dispersing the bolts.