(CNN) -- A Maryland funeral home has lost its license after investigators found about 40 bodies stacked on top of each other, leaking fluid, in a garage, a state official said.

The state Board of Morticians and Funeral Directors revoked the license of Chambers Funeral Home & Crematorium in Riverdale, Maryland after an April 26 visit to the site.

Hari Close, president of the the state funeral board, told CNN Tuesday that some of the bodies were cadavers who had been donated to a local university for research. Other bodies came from other funeral homes, Close said.

The bodies were supposed to be cremated, but investigators were alarmed at how they were stored in the garage while they awaited cremation.

"Even somebody who donates their body to science, they still should be treated with dignity," said Close. "Not to mention the health and safety issues with the body fluids flowing out."

William Chambers, co-owner of the funeral home, told CNN-affiliate WJLA said that he hopes to work with the state to resolve the alleged violations.

When investigators inspected the funeral home they were warned by an employee, who told them, "Don't get upset about all the bodies in there," according to documents released by the state funeral board.

Inside the room was a "large pile, approximately 12 by 12 feet, of body bags containing human remains strewn on the floor of the garage in front of a removal van. There was visible leakage from the body bags as well as a pungent odor," the documents said.

"The investigator also observed writing on some of the body bags," they said. "However, fluid leakage from the body bags caused the writing to smear and become illegible. As a result, it was not immediately possible to determine the identity of the remains."

There will be a hearing at the end of the month to determine whether the funeral home will get its license back, Close said.

CNN's Patty Lane contributed to this report.