Divers from the Portland Police Department recovered the body of a man who died Wednesday while diving under a fishing boat docked at the Portland Fish Pier.

Deputy Fire Chief Robert Thompson said the fire department deployed two fireboats, for assistance with the recovery, while a crew of divers from the police department went into the water.

Thompson said it took “quite a while” for the divers to recover the body after the city was notified of a possible diving accident around 5:20 p.m.

It was unclear why the man went into the water in diving gear.

Thompson said the police department is leading the investigation, and referred all questions to the city. Jessica Grondin, a city spokeswoman, said the man’s identity is not expected to be released until Thursday, pending notification of his relatives.

Grondin said the state Medical Examiner’s Office has been notified.

The Coast Guard is also investigating the cause of the accident.