If matters had gone differently about 125 years ago, all those monster cargo ships now backed up at anchor off San Pedro would instead be waiting offshore from the sands of Santa Monica.

The Great Free Harbor battle pitted two California oligarchs and their loyalists against each other over where the federal government would choose to put its money toward L.A.’s first industrial port. It was like bearded, Victorian versions of Jeff Bezos and Elon Musk racing each other into space, although space has enough room for them both; there never was going to be a San Pedro and a Santa Monica port.

The paradox of industrial Los Angeles County is that it prospered despite having no traditionally navigable river and no natural harbor. San Diego has a natural harbor. San Francisco has a peach of one. But Los Angeles just had beaches and cliffs and mud flats and marshes running from Point Dume in Malibu to below Long Beach. But L.A. never did let nature thwart its self-invention.

Today — at least when the supply chain isn’t throttled — 40% of all U.S.-bound cargo comes through the twinned ports of L.A. and Long Beach, the biggest port operation in North America.

But in the 1890s, when L.A.’s growth spurt was drawing thousands of new residents from the rest of the country by train, and millions of board-feet of lumber to house them — mostly from the Pacific Northwest — L.A.’s harbors and ports were straining to keep up.

This is not to say that boats and ships were strangers to L.A.’s waters. Native Americans were legendarily skilled in navigating the coast. In October 1542, the first known European to hit California, the explorer Juan Cabrillo, came ashore in a longboat, hung around long enough to name the place “bay of smokes,” for the haziness he encountered — Welcome to L.A.! — and sailed on north, where he completely overshot San Francisco Bay. Six decades later, the Spaniard Sebastian Vizcaino was sent out to check out potential harbors, and voila, “San Pedro Bay.”

Explaining L.A. With Patt Morrison

Los Angeles is a complex place. In this weekly feature, Patt Morrison is explaining how it works, its history and its culture.

Not until L.A.’s Spanish missions were built in the 18th century did the need for a working port become obvious, but Spanish restrictions on trade made the Los Angeles coast a smuggler’s paradise. The first American ship to put into port here, around 1805, was making a fine, daring haul trading illicitly in California otter pelts under the nose of Spanish authorities, who kept no garrison in San Pedro anyway. Once Mexico gave the boot to Spain and took over California, the trade in “California dollars,” cattle hides, was legalized and regulated — and its rules regularly flouted by ships’ captains bringing the world’s luxuries to California in exchange.

The writer Richard Henry Dana worked as a seaman in those years, and wrote of the hides being carted from the “pueblo” to the coast to be taken to the waiting ships off San Pedro, which “we all agreed that it was the worst place we had seen yet, especially for getting off hides,” and even worse for getting goods such as sugar off the landing boats and over and up the “green, slippery rocks. … At night, we went on board, having had the hardest and most disagreeable day’s work that we had yet experienced. For several days, we were employed in this manner, until we had landed forty or fifty tons of goods, and brought on board about two thousand hides.”

Not by any stretch an ideal harbor for a soon-to-be city.

Once California became a state, in 1850, Yankee businessmen turned loose in this new American frontier went to town, none with more vigor than Phineas Banning, the “father of the Los Angeles harbor,” a Delaware man whose red suspenders made him an unmistakable figure around the port. He arrived a year after statehood, and started at once making more goods move faster, onshore and off. He bought up coastal land, co-founded the town of Wilmington, launched a stagecoach and wagon service to connect downtown L.A. and the faraway port, and in 1869 laid on Southern California’s first rail service too. (That would in time be taken over by Southern Pacific, the grasping, squeezing “Octopus” railroad monopoly of California lore, and soon to take the stage in the harbor drama.)

Why, you may be wondering, would L.A.’s port be way down in San Pedro, when there was a perfectly good beach closer at hand, at Santa Monica?

The fact of it is that neither place was any mariner’s notion of an ideal harbor, but by 1890, as the city’s population and eminence were muscular, the showdown between the two sites was coming on fast.

San Pedro already had a head start of decades when Southern Pacific, headed by Collis P. Huntington — one of the “big four” California titans who made their first fortunes in the Gold Rush, by selling mining gear at handsome markups to the flood of 49ers — decided that the harbor ought to be in Santa Monica, where, golly, shipping would happen to be controlled exclusively by the mighty SP, along with a big hunk of coastal land.

Huntington was not accustomed to being thwarted, and local agencies, the state Legislature and Congress were populated with men who in some fashion or another were beholden to “Uncle Collis.”

The seven-year-long bout over the harbor turned out to be not a match between David and Goliath, but between Goliath and Goliath. The Times’ publisher, the equally truculent Harrison Gray Otis, used his inky pulpit to concoct an entity grandiosely named the “Free Harbor League,” and to it he rallied the city, its business and civic leaders against Huntington, a man Otis called “the old sinner” in print.

And Huntington, right in the middle of the seven years of federal study and debate over funding a breakwater for a new port, made a costly, calculated throwdown.

From his property in Santa Monica, he built an almost comically long pier out into Santa Monica Bay: 4,700 feet, which he called, upping the grandiosity factor, “Port Los Angeles.” It also went by the Long Wharf and the Mile-Long Pier, and it ran cargo and passengers, to show that it could be done.

Ships anchor off the Long Wharf.

Collis P. Huntington’s Long Wharf extended 4,700 feet into Santa Monica Bay.

While this was afoot, Congress had entered the fray. Its vote to fund a breakwater would essentially decide whether San Pedro or Santa Monica would be L.A.’s port. Against Huntington’s elected loyalists stood Stephen M. White, a young lawyer and a Democrat, but the Republican Otis was his friend — and his client.

Before his harbor heroics, and as a state official and U.S. senator, White had defended the disgraceful 1882 Chinese Exclusion Act and in 1893, went on the record with ugly comments about the Chinese as “an alien race” and worse.

In May 1896, over three days of speechifying, White dismantled Huntington’s case, marshaled the government’s own studies, ancient mariners’ assessments and popular opinion that Santa Monica was a poor choice in almost every particular. A west-facing shore like Santa Monica’s was more dangerously exposed than a south-facing shore like San Pedro, coddled as it was by Santa Catalina Island, whose lapping waves, White assured the Senate, were so calm that “there is no difficulty in ordinary weather in using any common rowboat handled by a lady or robust boy” to navigate them, and so the waters of San Pedro are thereby calmed.

White revealed a supposed “disinterested” party in the matter to be an agent of Huntington’s. To approve millions to build a breakwater — a basic structure required for a harbor — for Santa Monica, he declared, “will be the donation of $3,098,000 to a private corporation” — Southern Pacific — and “an outrage upon the public.”

White won the day. And while Huntington gnashed his teeth, Otis gloated in print: “THE EAGLE SCREAMS: SAN PEDRO SELECTED AS THE PEOPLE’S HARBOR … LOS ANGELES REJOICES LOUDLY OVER THE VICTORY … PARADE IN CELEBRATION OF THE GOOD NEWS.”

Postcard shows a breakwater snaking from the shoreline out to sea.

Every harbor needs a breakwater — the L.A. port’s is seen here on a vintage postcard from Patt Morrison’s collection.

In 1899, crowds collected to watch as work began on the breakwater off San Pedro, and over decades the harbor has been dredged and improved. In concert with the Port of Long Beach, which was founded in 1911, it became the biggest in North America, and indispensable in the years when California was the nation’s leading oil producer.

The Long Wharf, the world’s longest wooden pier, was dismantled by 1933, and a historical marker alone notes its tale.

The U.S. military found the new port sites useful. For 60 years, a military reserve site loomed on a cliff above San Pedro, principally as Fort MacArthur, and between 1932 and the 1990s, Long Beach was home port for the Pacific Fleet.

Some of you may have cleverly noticed the fly in the ointment. San Pedro and Wilmington were their own towns, not part of Los Angeles. How, then, could they be the Port of Los Angeles if they were not in Los Angeles?

L.A.’s solution was to annex the two towns, via an umbilicus of land about 16 miles long and sometimes as little as a half-mile wide that ran from the southern city limit to Wilmington and San Pedro — the “city strip” or “shoestring strip.”

Voters in L.A. and in the “city strip” voted for the idea in 1906, and three years later, Wilmington and San Pedro voted to surrender their independent city status and join Los Angeles.

Myriad stories can be told about the harbor, it’s surprising ethnic mixes, the accounts of its little islands, before World War II home to a thriving Japanese fishing community, now the site of a federal prison whose inmates have included mobsters — chief among them Al Capone — serial murderer Charles Manson, and the LSD enthusiast Timothy Leary.

A boy sits on a statue of former Sen. Stephen White.

July 20, 1994: Patrick Rozelli, 11, hangs out at the statue of Stephen M. White overlooking Cabrillo Beach in San Pedro.

(Robert Gauthier / Los Angeles Times)

As for Stephen White, one term in the Senate was enough for him. He died in 1901, not yet 50 years old. In 1908, a bronze version of him was raised up in L.A.’s civic center, its outstretched arm supposed to be pointing more or less toward the harbor but looking more like a man hailing a cab.

Eighty years later, Metrolink construction forced its move to a storage yard, but San Pedro came to the rescue of its savior senator, and the statue stands now near the entrance to Cabrillo Beach. For now.