Much like the battles fought in the sky during World War II, the battles fought on the sea were crucial to ultimately boosting the fights on the ground. In his free online course “The Second World Wars” for Hillsdale College, professor and scholar Victor Davis Hanson discusses how the Allied powers built a strong naval fleet, and where the Axis powers lapsed in their strategy at sea.

Before WWII began, the British Royal Navy was the most advanced in the world. As the war progressed and America realized they were going to be fighting in both the Atlantic and the Pacific, they launched a massive ship-building effort to take on the infamous German U-boats and attack the islands of Japan.

Perhaps the most significant mistake Germany and Japan made at sea was their failure to build air craft carriers, and their focus on building the biggest battleships and swarms of U-boats. Here’s why.

1. Aircraft Carriers

Battleships were the flashy weapons of choice. The German, Japanese, and Italian navies poured their resources into the biggest battleships they could build, but failed to diversify their fleets. A battleship could fire in a 20-mile radius, but if you have an aircraft carrier with 90 dive bombers, fighters, and torpedo planes, they can fly 200 to 500 miles around the carrier and increase your damage radius 10-fold.

Germany and Italy failed to build a single aircraft carrier. Japan started the war with seven fleet carriers. The United States started the war with only three carriers in the Pacific, were able to bring over two more, and ordered 27 Essex-class carriers—better than any other carrier in the world.

A carrier might seem a static asset that doesn’t appear dynamic or deadly, but as technology advanced throughout the war, carriers proved to be more adaptable than battleships and destroyers. Once a battleship with a 16-inch gun is at sea, you’re stuck with it. Even though a bigger gun might be available, you cannot upgrade that ship you’ve already invested resources in. But a carrier could always be updated with the most advanced and deadly fighter planes and bombers available.

Before WWII, battleships were thought to be the most important asset in naval warfare, but they eventually proved to be ineffective against a more diverse and flexible fleet centered around aircraft carriers.

2. U-Boats

Germany realized their mistake of investing heavily in battleships instead of aircraft carriers and launched a rapid attempt to build U-boats. The U-boats could submerge 300 feet underwater and fire torpedoes. They were successful at patrolling the Atlantic in “wolf packs” and destroying the Allied powers’ shipping convoys that were feeding and fueling Britain. Winston Churchill once wrote that “The only thing that really frightened me during the war was the U-boat peril.”

It was the U-boat commanders who convinced Adolf Hitler to declare war on the United States because as they sat in the Atlantic off the U.S. East Coast, they were watching U.S. ships take supplies to Britain but weren’t allowed to attack because they weren’t at war. For a brief moment in 1942, Germany sank 609 ships and destroyed 50 percent of all supplies going to Britain. Eventually the Allied powers were able to respond by developing sonar, obtaining German naval codes, and out-pacing the Germans by producing more merchant ships than they could destroy.

Back in the Pacific, there were more than 40 engagements between Japanese and American warships. Even though Japan saw some victories against the United States, their ultimate failure was that they could never destroy or compete with the manpower and production in North America. At the end of the war, the United States Navy cemented its position as the largest in the world.