EASTON, Mass. (WPRI) — Two teenagers who got lost in the woods Wednesday afternoon have been rescued, according to the Easton Police Department.

The search began around 4:30 p.m., when the teenagers were first reported missing. Police said the 16-year-old boys became lost in the woods near Hockomock swamp off Turnpike Street.

Search crews found the boys around 7 p.m. behind a railroad bed off Foundry Street, according to police.

Police said it took rescuers roughly two hours to get the boys to safety due to the difficult terrain.

The teenagers were both dehydrated but otherwise OK, according to police. The boys were evaluated by first responders before being reunited with their families.