In 1979, Capt. Tom Shanahan, commanding officer of the USS Canisteo, did something no U.S. Navy officer had done since the Revolutionary War. He refused to take his ship to sea.

It wasn’t mutiny. Shanahan declined to certify the ship and crew as seaworthy. The Canisteo was short-staffed, its crew inadequately trained.

Shanahan’s stand sparked a firestorm of public controversy over the “hollowing out” of the American military, which occurred after the Vietnam War.

Today, history looks to be repeating itself.

Recent collisions involving U.S. naval ships at sea and a spate of U.S. Air Force accidents have heightened already high concerns about how chronic underfunding of our armed forces over the last six years has eroded readiness and raised risks among those in uniform.

These concerns are well-founded. While defense spending soared after 9/11, the lion’s share went to pay for combat operations in Iraq and Afghanistan — not to refurbish the force fighting the war. Investments to rebuild our military never got made.

The pace of deployment has remained high, even as the number of troops has been cut and spending on repairs and training have been scaled back. In the Navy, for example, some of the maintenance backlog for deferred repairs goes back four years.

The problem is bigger than just unready ships, pilots and crews. The U.S. military is too small to cover the missions it has been assigned. While it is true our Navy has some of the best ships on the planet, each of those ships can be in only one place at a time.

Insufficient force size, combined with insufficient resources to keep the force ready, much less modernize it, leaves the Navy and other services sailing into a perfect storm of unpreparedness.

Here is what the Navy needs.

First, we need to think ahead. The ships we build today will constitute the majority of the fleet in the 2030s and beyond. Currently, the Navy has 277 ships.

The Navy says it needs 355 — assuming it will be able to build more-capable ships. Some outside experts say as many as 459 ships will be required.

Regardless of future ship and platform capabilities, the fleet will need to grow. And it must start growing now to keep up with missions to protect vital U.S. interests. Those interests span the seven seas, extending even to the upper reaches of the Arctic.

The Navy wouldn’t have to cover all that water if the sea lanes were safe. Keeping them secure and open is vital to the prosperity of our nation, our allies, and indeed, most everyone in the world.

Of the world’s 195 nations, 147 border an ocean or sea. Forty percent of the world’s population lives within 63 miles of an oceanic coast. In addition, maritime trade via international shipping lanes comprises over 90 percent of global commerce.

What goes on under the sea is important, too. Ninety-nine percent of all international data conveyed via phone, texts, and internet are transported via approximately 200 undersea fiber optic cables at speeds eight times faster than by satellite.

Yet today, China poses a growing maritime security threat in the South China Sea and the Pacific. A resurgent Russian Navy has established new bases in Syria and the Arctic while cementing its hold in Crimea. Threats from Iran and North Korea are growing as well.

America has a long to-do list to meet these challenges. At a minimum, it must sustain a modern force of 12 aircraft carriers. It must develop and deploy a new frigate-class ship as well as a next-generation platform for destroyers. Most critical of all, it must retain its competitive advantage in undersea warfare.

And did I mention readiness?

James Jay Carafano is the director of the Center for Foreign Policy Studies and the deputy director of the Institute for International Studies at The Heritage Foundation, a conservative think tank on Capitol Hill. Readers may write to him at Heritage, 214 Massachusetts Ave. NE, Washington, D.C., 20002-4999.