The container ship CMA CGM Benjamin Franklin, the largest ship ever to call at an American port, sailed under the Golden Gate Bridge on the last morning of the old year Thursday to begin a new day in maritime commerce.

The Benjamin Franklin, which sailed from China by way of Los Angeles, docked in Oakland. It is the first of a series of larger and larger ships heading for U.S. ports.

“We have been preparing for this for years,” said John Driscoll, maritime director for the Port of Oakland, who rode the pilot boat Drake from San Francisco and boarded the big new ship just inside the Golden Gate.

Preparing meant spending $400 million on dredging to make sure big ships can fit into the Oakland harbor, as well as upgrading cranes and other port facilities. “Oakland is the most efficient port on the West Coast, and ships like this are important to us,” Driscoll said.

The Benjamin Franklin, which is 1,310 feet long, displaces 158,000 gross tons and can carry 18,000 shipping containers, loomed over the pilot boat like a moving mountain of steel.

“God, that’s big,” said George Livingstone, a ship pilot who boarded the Benjamin Franklin at the Golden Gate. “You know that’s something when even professionals are saying, ‘Wow!’”

Big ship dwarfed

Livingstone and two other pilots, John Carlier and David McCloy, went aboard to familiarize themselves with megaships like this and to assist the principal pilot, Capt. Richard Hurt, who was in charge of guiding the ship in from the ocean to its dock at the Oakland Outer Harbor.

As the Benjamin Franklin came under the Golden Gate Bridge, it passed the container ship Matsonia, bound for Hawaii. The two ships exchanged whistle salutes — three short blasts on the whistle and a long blast for good luck.

The Matsonia, which regularly sails from California to Hawaii, was considered a big ship when it was new 42 years ago. The Benjamin Franklin, which went into service in the first week of December, is more than four times the size of the older ship. The Matsonia looked almost like a ship model next to the brand new megaship.

The Benjamin Franklin took it slow inside the bay, easing to about 8 knots to pass the San Francisco waterfront, and slower still as it made a turn to go under the Bay Bridge. Livingstone said it would clear the bottom of the bridge by about 15 feet.

It took about an hour to get from the Golden Gate to the dock at the Oakland Outer Harbor. Four tugs helped the ship into the dock.

It was a perfect day to mark a new era in shipping — the sky was clear, the sea was calm, there was no wind or fog, and everyone was as careful as they could be.

“We are always aware that there is a risk with a ship this huge,” said Coast Guard Capt. Greg Stump, captain of the port of San Francisco Bay. “There is safety, there is security and environmental concerns.”

Livingstone said piloting ships like this is “a public trust.”

“We have to be perfect,” he said. “Ninety-nine percent is not good enough.”

More megaships planned

There are not many ships the size of the Benjamin Franklin, and most of them are deployed on trade routes from Asia to Europe. But the ship’s owner, the French outfit CMA CGM, is expanding its trade in the Pacific and hopes to send more megaships to the West Coast.

Big ships are more efficient because of the economy of scale, Livingstone said, and many more are on order.

“In the next two years,” he said, “50 of these ships will be launched. We need to be ready.”

Carl Notle is a San Francisco Chronicle staff writer. E-mail: cnolte@sfchronicle.com Twitter: @CarlnolteSF

Megaship on video

To see the CMA CGM Benjamin Franklin passing under the Golden Gate Bridge and into the bay, go to http://sfg.ly/1YUPdTx