Falling rocks narrowly avoided hitting workers as they landed well outside the designated blast zone at Moons Hill Quarry near Shepton Mallet on 7 February 2012.
Bristol Crown Court heard that workers acting as sentries outside the danger area were aware of rocks flying above their heads and landing all around them immediately after the blast.
Rocks also landed in the processing plant area of the quarry, which is on the other side of a public road.
HSE inspectors discovered that the blast had not been properly planned.
Too much explosive was used in an area where the ground was already broken and measures put in place to reduce risks were inadequate.
WCD Sleeman and Sons Ltd, of Frome, was fined £30,000 and ordered to pay £20,000 in costs after pleading guilty to safety breaches.
The court was told the firm was prosecuted by HSE after investigating a similar offence in Devon when they were fined £20,000 with £17,000 costs in July 2013 at Barnstaple Magistrates’ Court.
Speaking after the hearing, HSE Inspector Catherine Pickett said: “This was a very serious incident, which put both members of the public and employees at serious risk of being hit by rocks and could easily have led to death or serious injury.
“Blasting operations at quarries are potentially very dangerous. The risks must be rigorously controlled by good explosives engineering practice and in accordance with legal requirements.
“Quarrying remains one of the most dangerous industries to work in with 3,250 injuries, including 27 fatalities, reported to HSE since 2000.
“This is not the first time WCD Sleeman and Sons have been prosecuted for similar offences that have put people at considerable risk and I hope they take more heed of the lessons to be learned.
“Proper planning and control is required at all times in the quarrying industry. The option of stopping and reevaluating the blasting operation for safety is always available to shotfirers, and in this case would have avoided danger.”