A 13-year-old boy was rescued by firefighters, police officers and the U.S. Coast Guard Saturday after he was swept out to sea in Gloucester.

Authorities said the boy, who is from Gloucester, fell off a rock at Rafe's Chasm and was swept away from land sometime around 5:20 p.m. Saturday.

First responders learned the boy had been taking photos of the waves with his friends when he fell off of a rock and into the water.

“At the time police and firefighters arrived on the scene, he had been swept approximately 50 to 75 feet offshore,” authorities said. “The U.S. Coast Guard Gloucester Station was informed of the incident, and promptly launched a 47-foot motor lifeboat in search of the boy.”

The boy was several hundred feet away from shore when he was rescued by the Coast Guard.

The boy was taken to a local hospital for treatment. He was in good condition last night.

“Fortunately, as a result of the swift, seamless teamwork between the Gloucester Fire and Police Departments and the Coast Guard, this boy was rescued very quickly,” Fire Chief Eric Smith said. “Time is critical in an incident like this, and I'd like to thank all those who took part in today's rescue.”