A man was critically injured in Fairfax County on Friday when a trench collapsed. A second man was also injured, authorities said.

One man was covered in dirt from head to toe when firefighters arrived in the 4100 block of Conrad Road in the Bailey’s Crossroads area, a county fire department spokesman said.

The other was in dirt up to his chest, said Capt. Willie Bailey, the spokesman.

He said the men were in a trench 3 feet wide by about 12 feet deep, working on water pipe repair. It took about 40 minutes to free them, he said.

He said one of those injured apparently lived in a house at the work site. But it was not known which one.

Both were taken to hospitals. The cause of the incident was under investigation.