The three-masted SV Concordia was on a five-month voyage that allows students in secondary school grades 11 and 12 and the first year of college to study while sailing around the world. The ship sank Thursday afternoon and all 64 people aboard were plucked from the sea early Friday by merchant ships, the Brazilian Navy said.

At least 12 of the rescued docked in Rio at 10:45 a.m. on a Brazilian Navy ship. The rest were to arrive later in the afternoon on two merchant vessels.

In the port, about 10 young students stood on the deck of the Navy ship in orange rescue jumpers and Naval caps, taking photos of themselves and the dozens of photographers waiting to meet them.

The Concordia was caught in high winds and heavy seas when it went down. A navy statement said a distress signal was picked up about 5 p.m. Thursday, and a Brazilian Air Force plane later spotted life rafts in the ocean about 300 miles (500 kilometers) from Rio.

Forty-eight of those on the vessel were students, said Kate Knight, head of West Island College International of Lunenburg, Nova Scotia, which operates the Class Afloat program.

Edgardo Ybranez, captain of the Philippine flagged Hokuetsu Delight cargo ship, told The Associated Press via satellite phone that his ship rescued 44 people from the rough, dangerous seas. The others were picked up by another ship.

Ybranez said everyone from the Concordia was unhurt except for the doctor, who suffered an injury before the rescue "but he is OK now." He gave no more details.

"You can tell their parents that everything is OK; everybody aboard my ship is fine," Ybranez said.

The captain declined to put any of the survivors on the telephone. "They are all downstairs sleeping because they are exhausted, so I don't want to call any of them up," he said before cutting off the call to communicate with his employers.

Shelley Piller, whose 17-year-old stepdaughter, Elysha, was on board, told the AP in a telephone interview from Kenilworth, Ontario, that she was worried despite hearing news that everyone was safe.

"That's my kid. For me I need to actually physically see her, feel her and have her in front of me to understand that she's safe," Piller said. "We're petrified, absolutely petrified." Canadian Prime Minister Stephen Harper issued a statement thanking the Brazilian Navy and the merchant ships "for their swift and heroic response." School officials said 42 of those aboard were from Canada.

Knight said others hail from the United States, Australia, New Zealand, Mexico, Europe and the West Indies.

The ship had visited Europe and Africa since leaving Canada in September, and it had just begun a five-month semester program on leaving Recife in Brazil's northeast Feb. 8. It had been scheduled to dock Tuesday in Montevideo, Uruguay, then visit several islands in the Atlantic as well as southern Africa and the Caribbean before returning to Canada.

West Island College International's Web site says the 188-foot-long (57.5-meter-long) Concordia was built in 1992 and "meets all of the international requirements for safety." It carries up to 66 passengers and crew and also can operate under motor power.

The site lists tuition for the sailing program at 42,500 Canadian dollars ($40,600) a year.