Two workers in Boston were killed when a water main gave way and flooded a deep trench where they were working.

The Boston Fire Department recovered the bodies Friday night in the South End neighborhood after several hours of painstaking work. In Twitter messages, the department said its technical rescue crew had to work in a trench box. The firefighters were on their knees gently removing dirt with their hands to reach the dead workers.

"Very difficult operation on Dartmouth St. 1st responders trying to respect the deceased while continuing the recovery," read one tweet.

The first body was recovered around 6:30 p.m. and the second shortly after 8 p.m. The fire department then tweeted the recovery operation was over. It urged people to "remember their families/friends."

The two workers were not publicly identified.

Boston Mayor Marty Walsh expressed his condolences Friday night, adding "Today is a difficult day for the entire City of Boston, and especially those who go to work at construction sites everyday to make our city better."

Boston Police Commissioner William B. Evans told The Boston Globe that it appears "somehow a pipe must have broke and unfortunately they weren't able to get themselves out of a hole." He said it appeared other workers were able to escape from the trench.

When fire crews arrived on the scene, fire department spokesman Steve MacDonald said they found "workers trapped in a trench in the ground that was filling rapidly with water."

The trench was estimated to be about 12- to 15-feet deep.

Boston Police, the Occupational Safety and Health Administration and the Suffolk County District Attorney's Office will be investigating the cause of the deadly incident, MacDonald said. The workers were employed by a private contractor. Neighbors told The Boston Globe that trucks with the name Atlantic Drain Service Co. Inc. had been parked in the area for most of the week.