Photo: Chris McGinnis Photo: Brandon Mercer / SFGate Photo: Chris McGinnis Photo: Chris McGinnis Photo: Alaska Airlines Photo: Charles Krupa, Associated Press Photo: InSapphoWeTrust Photo: Chris McGinnis Photo: Chris McGinnis Photo: Air Canada Photo: EVA Photo: Chris McGinnis Photo: Paul Chinn, The Chronicle Photo: Jason Vaudrey Photo: Chris McGinnis Photo: Virgin Atlantic Photo: Chris McGinnis Photo: Chris McGinnis Photo: J.C. Photo: SFO

The Bay Area's infamous fog can be merciless when it comes to delaying flights at San Francisco International Airport.

Just ask those arriving on a United Airlines flight from New Delhi, India last Friday morning when fog diverted their 15-hour, SFO-bound flight to Oakland International Airport.

United Flight 105 landed in the East Bay at 6:15 a.m., but passengers said they spent more than four hours sitting on the plane waiting for that airport's customs and immigration halls to open.

At Oakland, Customs and Immigration checkpoints do not open until noon — that’s about when the first international flights to OAK (all from Mexico this time of year) arrive.

“They wouldn’t come in any earlier for us,” said Steve Rabin, a Palo Alto resident who was on the flight.

And then a mechanical fault hit the Boeing 787-9 Dreamliner jet that had to be checked out by a United mechanic.

One problem: United no longer has staff in Oakland, since it departed there in 2012. A mechanic had to drive across the bridge from SFO to perform the inspection, Rabin said.

RELATED: Why SFO suffers from weather delays more than other airports

Rabin said passengers were finally let off the plane at 11 a.m., when the Oakland checkpoint opened earlier than anticipated.

To make matters worse, the nonstop flight from New Delhi to San Francisco already experienced a 90-minute delay taking off from Delhi at the crack of dawn, according to Rabin. The flight is normally scheduled to depart at 3:50 a.m. local time. (You can track the flight here.)

He said with delays on the ground at either end of his journey, he estimates he spent 20 hours on the airplane (thankfully) seated in business class.

During the delay in Oakland, he said resources on the flight began running low.

“Water was being depleted,” he said. “I felt bad for the flight attendants because they had just worked a 15-hour flight, and it was a tough card to be dealt.”

“Passengers deplaned and were held in a secure gate area where they were provided food and refreshments while waiting for officials to arrive from SFO to clear them,” a United Airlines spokesperson said. “Once our passengers were cleared, we arranged for ground transportation to get them to their destinations as quickly as possible.”

Rabin took an Uber home — sans his checked luggage, which he said the airline would be delivering to his home.

Don't miss a shred of important travel news! Sign up for our FREE bi-weekly email alerts

Another United 15-hour, long-haul flight from Tel Aviv to SFO diverted to Sacramento Friday morning, also because of the fog. Flight 955 tried to land at SFO, but then diverted to Sacramento just after 6 a.m. It did not take off for SFO again until 10:30 a.m. after a new flight crew was brought in.

Passengers stayed onboard that flight, too, because the U.S. Customs and Immigration checkpoint in Sacramento was not open yet either.

The foggy weather at SFO early Friday morning was rough. At one point, only 14 planes an hour were allowed to land. There was also a runway closure when the foggy weather rolled in, according to United, complicating conditions. During foggy conditions, the number of planes allowed to land normally hovers between 25 and 33, depending on the runway configuration.

Delays impacted nearly every airline and flight. Only 38 percent of arriving flights between 6 a.m. and noon Friday were on time. Everything else was either late, canceled, or were diverted elsewhere.

SFO diversions are relatively common, but Rabin said he'd like better contingency plans in place for future events.

“It’s not the end of the world, Rabin said. “No one was hurt or anything, but it just felt like really poor planning.”

Read all recent TravelSkills posts here

Chris McGinnis is SFGATE's senior travel correspondent. You can reach him via email or follow him on Twitter or Facebook. Don't miss a shred of important travel news by signing up for his FREE biweekly email updates!

SFGATE participates in various affiliate marketing programs, which means we may get paid commissions on editorially chosen products purchased through our links to retailer sites.