A San Francisco-based cruise ship carrying more than 3,000 people is being held off the California coast as officials begin testing passengers for coronavirus after learning that two former passengers of the ship tested positive for COVID-19.

The two former passengers were on the ship between Feb. 11 and Feb. 21 for a cruise to Mexico. When the ship returned to the Port of San Francisco, they — along with nearly all of the 2,500 passengers — disembarked and headed home. The two former passengers were later diagnosed with COVID-19. One, a Placer County resident, died Wednesday.

By the time officials realized both patients were former passengers of the Grand Princess — and may have acquired the virus while on board, the ship was already out to sea — for a 15-day trip to Hawaii. That cruise was scheduled to end in San Francisco on Saturday but officials cut it short and ordered the ship held off the California coast as they assess the situation.

On Wednesday, officials said 62 passengers currently on the ship were also passengers during the February trip to Mexico. Those passengers could have been exposed to the virus and could have exposed the new passengers.

Officials said 20 people on board now have flu-like symptoms.

Newsom said Wednesday that public health officials plan to airlift at least 200 test kits to the cruise ship. The 62 passengers from the Mexico trip and the 20 people who currently have symptoms will be tested for the virus first, he said.

The Centers for Disease Control and Prevention, the California Department of Public Health, and the U.S. Coast Guard are working now to determine when and where the ship will be allowed to dock. The ship is currently about a day out to sea, Newsom said.

Erin Allday is a San Francisco Chronicle staff writer. Email: eallday@sfchronicle.com