A teenager who spent more than nine hours aboard a capsized sailboat just north of the Annapolis anchorage was rescued by U.S. Coast Guard officials and other emergency responders early Sunday morning and taken to the hospital for treatment of hypothermia, authorities said.

Authorities were first alerted that the 18-year-old was in trouble when a navigator on a passing freight ship spotted him waving his hands at about 8:30 a.m. Sunday, said Coast Guard Lt. j.g. Salomee Fisher. Fisher said rescuers from the Coast Guard, Anne Arundel County and the Maryland Natural Resources Police rode out to help the teen — whose sailboat had apparently capsized about midnight. She said she did not know what caused the sailboat to capsize.

Fisher said it took rescuers about 45 minutes to bring the teen to safety. She said the teen’s core temperature had dropped to 87 degrees. He was airlifted to a nearby hospital for treatment of hypothermia, and he is expected to survive.

“We’re happy to have a good ending to this Easter morning ordeal, and happy to have a mariner safe at home with his family today,” Fisher said.