NEW VINEYARD — A 4-year-old boy was being treated at a Boston hospital Tuesday night after one of his legs was severed and the other was severely injured by the bucket of a front-end loader being operated at a gravel pit by his grandfather, police said.

Adam Mattson of New Vineyard was with his grandfather — his legal guardian — at a family gravel pit off Anson Valley Road when the incident occurred around 1 p.m. Monday, Franklin County Sheriff Scott Nichols Sr. said. At some point the grandfather turned his attention away and the child got underneath the bucket when it was in the air, the sheriff said.

“It was at that point the bucket lost hydraulic pressure, lowered and captured both legs of the child, severing one,” Nichols said.

The grandfather wrapped Adam’s legs to try to stop the bleeding and drove the bucket-loader about half a mile to a truck to take him to Franklin Memorial Hospital in Farmington, Nichols said.

Farmington Police Officer Ryan Rosie alerted Franklin County deputies to the incident just before 2 p.m., after he stopped a vehicle for speeding and erratic driving and discovered the driver was delivering a severed leg to the hospital for possible reattachment to a young child. Rosie escorted the vehicle to the hospital.

The child was flown by a LifeFlight helicopter to a Boston hospital, Nichols said.

“There is no doubt that the actions taken by the grandfather saved the child’s life,” he said.

According to a GoFundMe page set up by family friend Jessica Harris, the boy was in stable condition Tuesday night, but surgeons were not able to reattach the leg.

Deputies Keith Madore, Sgt. Nathan Bean, Chief Deputy Steven Lowell and Lt. David Rackliffe went to the Anson Valley Road to investigate, and Detective Stephen Charles went to the hospital.

PressHerald.com disables reader comments on certain news stories, including those dealing with sexual assaults and other violent crimes, personal tragedy, racism and other forms of discrimination.