CARLSBAD – A group of California students and teachers was released Thursday after being quarantined for a week in China because some of their classmates tested positive for swine flu, a school spokeswoman said.

The 26 ninth graders and five teachers who had been held in a hotel in Yichang for a week were released, in addition to three students and a teacher who were in a hospital but tested negative for swine flu, Caroline Callaway, a spokeswoman for the private Pacific Ridge School in Carlsbad, said in a statement.

Callaway said the group will travel to Shanghai and leave China Saturday. It was not immediately clear when they would arrive in California.

Six students and one teacher who tested positive for swine flu remained in a hospital, Callaway said.

The group of 35 ninth-graders left for China on June 2. Before the quarantine, they climbed the Great Wall, explored the immense plazas of the Forbidden City and visited the Terra Cotta Warriors in the inland city of Xi’an.

The group had embarked on a river cruise to Three Gorges Dam when a handful of students and one teacher started feeling sick and saw a doctor onboard.

Under the Chinese government’s protocol, the students and teacher were taken to a nearby hospital when the boat docked.

Callaway said she didn’t know where the students contracted the virus. They didn’t have flu-like symptoms before the trip, she said.

The first cases of swine flu were discovered in Mexico and the United States, before cases started showing up in Asia.

At the hotel where the group was quarantined, each student was held in a different room with a television and phone. Hotel employees made food runs for the students, who were not allowed to have personal contact with anyone.

Rick Sapp, chair of Pacific Ridge’s board of trustees, told television station San Diego 6 that his 15-year old daughter was among the students in the hotel. He said she remained upbeat and entertained herself by reading a book.

After the river cruise, the group was scheduled to head to Shanghai and stay with local families before returning to California.

Callaway said the group might hold an event on campus once they’re home to mark the end of the school year, which ended Tuesday.

The trip was tied to the ninth graders’ study of ancient history and water resources.

Pacific Ridge opened in 2007 as a college prep school beginning with the seventh grade.