The news from the waterfront last week was reassuring. The Port of Los Angeles said it handled 16 percent more cargo containers last year than in the previous year. And next door, the Port of Long Beach reported it handled 24 percent more – its biggest increase ever.

But what’s not so reassuring is this: The ports’ future still remains a bit tenuous.

That’s because the reconstruction of the Panama Canal continues. When the bigger and better passageway opens in 2014, it can begin handling huge container ships that haul all those consumer goods, automobiles and other stuff from China and the rest of Asia.

Now, those cargo ships are more or less forced to come here, which is why the ports of Los Angeles and Long Beach have become America’s No. 1 and No. 2 ports, respectively. But in about three years, those ships will be free to sail to the Gulf and East coasts – and ports in those areas are beefing up now to lure those ships.

“We have a bull’s-eye on our back,” Geraldine Knatz, executive director of the Port of Los Angeles, told the Business Journal last week.

How much business is at risk? The L.A. port estimates roughly half of the containers offloaded there are destined for the Southern California region. But the other half is discretionary – those containers go to Western, Midwestern and even Eastern states. Those are the ones at risk.

The situation gets worse. Most of those discretionary containers get put on the Alameda Corridor – the rail line that takes containers from the ports and starts them on their trip to the country’s interior. Each container on the corridor pays a fee, which in turn helps pay the debt on the $2.4 billion corridor.

Since it was assumed years ago that the ports would handle ever-increasing containers of cargo, the Alameda Corridor debt payments keep rising through the years. But if the number of containers does not go up much – or even goes down – there will be a shortfall of money to make the debt payments. And the financial backstop for the Alameda Corridor bonds? The two ports, which could be on the hook for millions a year each. Millions that would be harder to pay if business declines.

In addition, the port complex faces all kinds of expensive mandates. A state environmental rule for so-called cold-ironing will go into effect in a few years, costing the shipping industry well more than $1 billion. The replacement of the crucial Gerald Desmond Bridge will cost about $1 billion, and the Clean Trucks Program more than $2 billion. The article on the front page of the current issue of the Business Journal describes the L.A. port’s main channel-deepening project, which is not cheap.

Of course, the practice in the past and the temptation in the future will be to pass on many of these costs to the customers of the ports in the form of per-container fees and the like. The problem: with other ports becoming available to shippers in a few years, the customers may be less willing than ever to pay those costs. They may be quite willing to go elsewhere.

In short, the port complex may well lose its near-monopoly status in a few years. Perhaps state and local governments may even be forced to consider something unimaginable just a few years ago: subsidies for the ports.

Yes, it’s good to see that the cargo container numbers were up last year, and significantly so, thanks largely to an improving economy. But the ports face real medium- and long-term challenges, and they will have to do some creative and difficult work to keep those cargo numbers up.