The airport was a 16-hour overnight vigil of lines and paperwork and stress and delays, of squawking children and the worried well, all trying to board the same two planes.

Ningxi Xu’s name was on the list. But until the converted cargo plane was rising into the sky over Wuhan, China, she couldn’t be certain she would be one of the lucky Americans to escape the center of the coronavirus outbreak and make it back home.

With a blue band fastened around her right wrist, she became passenger 199, took her seat with her government-issue boxed lunch and face mask, and left on one of the two flights that landed in California on Wednesday.

One flight delivered 178 people to Travis Air Force Base outside Sacramento. The other landed there, then went on to Marine Corps Air Station Miramar in San Diego, where about 170 people exited. Two more flights are leaving Wuhan and arriving in the United States on Thursday. An additional 195 people who arrived Jan. 28 are quarantined at March Air Reserve Base in Riverside, Calif.

Wednesday’s evacuees face 14 days of quarantine in hotels on the military bases, as authorities wait to see whether anyone has the virus. A patient in Wisconsin tested positive for it, bringing the total in the United States to 12 as the global toll grew to 563 people dead and more than 27,000 ill in the health crisis spreading out of China.

The extended confinement is unwelcome, passengers said, but people seem to be taking it in stride.

“Most people were just glad to be getting out of there,” Xu said from her hotel room at Miramar. There were “a lot of kids and parents and grandparents.”

“At this point, I’m just happy to be in the States,” said Chunlin Leonhard, a law professor from New Orleans who is quarantined at the Travis base. “I haven’t thought about much else.”

Each flight appeared to have at least one sick person aboard. On Leonhard’s plane, officials said, a small child with a fever was isolated in the rear of the craft in an area blocked off with plastic sheeting. Xu said she saw a woman in a similar place on her flight. The woman did not appear to be aboard for the final leg to Miramar.

Wearing protective suits and masks, government workers moved about the planes during the 12-hour flight, taking the passengers’ temperatures twice. They were also screened before they boarded and again as they left the planes.

Xu, who is from New Jersey, was called to the front of the plane when her temperature rose slightly. Other passengers shied away as she made her way up the aisle, she said. But her temperature stayed within the normal range and she was allowed to proceed to the hotel.

Henry Walke, a doctor with the Centers for Disease Control and Prevention who is in charge of the evacuees’ care during the quarantine at Travis, said the first families to leave the plane were applauded by government personnel who greeted them, an emotional scene that highlighted the passengers’ relief.

“They’re glad to be here. They’ve been through a lot, and we’re going to do everything possible to care for them,” he said.

This is the first quarantine ordered by federal health officials in more than 50 years, and the CDC is having to improvise. Each family has a private room but is being told to keep some distance — at least six feet — from other families. The children will be told not to share toys.

“We want to maintain some social distances between family units, but at the same time we are not restricting people to their rooms. So it’s a delicate balance,” Walke said.

Many plans are still fluid, said Christopher Braden, the CDC ­infectious-disease doctor who briefed reporters at Miramar. “This mission changes . . . not by the day, by the hour,” Braden said.

With many employees of the U.S. Consulate in Wuhan previously evacuated, Wednesday’s travelers said they were left on their own to secure a seat on the flight, make their way through locked-down Wuhan to the airport, and find the flight in the confusion there.

For Ken Burnett’s family, it was just the latest harrowing chapter in a month of worry. It started as a getaway vacation for his wife, with Burnett staying behind in San Diego to work while Yanjun Wei took 3-year-old Rowan and Mia, 1, to visit her family in Wuhan for the Lunar New Year. Burnett was supposed to join them later in Hong Kong and they would fly back to­gether.

Then the coronavirus struck, and Wuhan came to a standstill. Wei and the children were trapped in a relative’s apartment with her Chinese parents for a month. As their supplies dwindled, Wei’s mother would venture out every few days to try to find food, including fresh vegetables.

“As a father it’s just the worst feeling you can imagine,” Burnett said. “The thing you want most in the world is to say, ‘It’s going to be okay; I’m coming over to get you guys.’ And instead I’m stuck here, helpless.”

The U.S. government originally promised Wei and the children seats on a chartered plane that was supposed to leave Saturday, but that flight was canceled at the last moment.

To make Wednesday’s flight, Wei had to find her way through multiple checkpoints and police roadblocks.

Burnett said his wife later told him that she reached a breaking point on the plane and sought help from other passengers and medical staff.

Leonhard and another American took an eerie four-hour drive from Songzi City to Wuhan airport to get out. For hours they were the only car on the freeway, she said, with trucks taking supplies to the idled city. She was in China on a Fulbright grant during a sabbatical from Loyola University New Orleans College of Law.

She was told to be at the airport by 6 p.m. Tuesday for a 10 p.m. flight. She arrived early, determined not to miss her chance. The plane did not take off until 8 the next morning.

With no U.S. officials to guide them, the evacuees organized themselves over the WeChat app. moving from place to place with each rumor of where they should be and when they might leave. At one point, they were divided in half by the first letter of their last names, which caused chaos when it separated families. Chinese children don’t always have the same last name as both of their parents.

“It was pretty chaotic,” Leonhard said. “The embassy did not have enough people. It’s clear that they didn’t have the crowd-
management team on hand, and it was clear they didn’t think through the crowd management.”

Xu said: “People didn’t really want to talk to strangers because they didn’t want to risk contagion. I was just really frustrated.”

“It’s actually more dangerous to be there than outside in the street,” she added, noting that there were hundreds of people “sitting there next to each other.”

Finally they boarded and took off for two weeks as guests of the U.S. government. The evacuees must keep a log of their temperatures and will be taken to hospitals if they develop symptoms.

“It’s going to be a long 14 days,” Burnett said of his wait to see his quarantined family. “But at least now I know they’re safe. It’ll be an easier 14 days than the past 14, for sure.”

O’Grady, Bernstein and Wan reported from Washingon; Fifield reported from Fuzhou, China. Lena H. Sun and Joel Achenbach in Washington contributed to this report.