Seventy-four years ago this week (Dec. 7), the Imperial Japanese Navy launched a devastating and surprise attack on the U.S. naval base in Pearl Harbor, Hawaii, killing more than 2,000 service members and ultimately accelerating America’s involvement in World War II. While the military and intelligence-gathering practices of the time may appear to be that of a distant past, there are several key lessons the United States can and should continue to derive from the attacks on Pearl Harbor.

First, despite repeated attempts to correct the process by which intelligence is gathered and shared, there will always be intelligence failures. Before the Pearl Harbor attack, the United States had managed to break the Japanese diplomatic code, but, because there was inadequate intelligence sharing among government agencies, the information did not reach the right officials. To correct this deficiency, a centralized intelligence agency, the CIA, was established after World War II.

However, 60 years after the creation of the CIA, another devastating attack occurred on American soil: the 9/11 attacks. A commission was formed to analyze the reasons for the failure by the intelligence community to prevent the 9/11 attacks, and concluded that one reason for the failure was that the intelligence community was beset with bureaucratic rivalries. Therefore, the commission recommended the creation of a national intelligence director, the DNI, to overcome these rivalries, a recommendation that was adopted a decade ago.

Second, even if these bureaucratic rivalries can be overcome, there will still be intelligence failures, particularly when the intelligence community overreacts to previous mistakes it has made. For example, after the failure to anticipate the attacks of 9/11, the intelligence community provided mistaken information on Iraq’s weapons of mass destruction about a year after the attacks of 9/11, thus leading to the needless invasion and occupation of Iraq. And because the intelligence community was so focused on al-Qaida — which it had ignored before 9/11 — it was caught flat-footed by the rise of ISIS and the Arab Spring.

Third, while the American people will eventually want to hold individuals or institutions responsible for intelligence failures like Pearl Harbor or 9/11, our immediate reaction as a nation after a cataclysmic attack is to rally around the flag.

For example, President Franklin Roosevelt’s Day of Infamy speech in the immediate aftermath of Pearl Harbor, in which he declared war on Japan, rallied the country to the war against all the Axis powers. Within 1,366 days, primarily because of the efforts of 8 million men and women who joined the armed forces in that period, we defeated Japan and its Axis allies, Germany and Italy.

Similarly, after 9/11, the nation rallied behind President George W. Bush and, within three months, our military and intelligence personnel had driven the Taliban and al-Qaida out of Afghanistan and created a friendly government in that country.

Fourth, although the attack on Pearl Harbor appeared at first to be a victory for the Japanese, in the long run it proved to be a strategic blunder. The attack was intended to destroy the most important units of the American naval fleet, to buy time for Japan to consolidate its position in the Pacific and naval strength, and deliver such a serious blow to American morale that it would discourage the American people from committing to a war.

However, the Japanese attack focused on destroying the American battleships, which were constructed to deal with threats of a bygone era, and left the U.S. carriers and submarines intact. These were the vessels that would prove decisive in the Pacific theater. They allowed the United States to take the battle to the Japanese immediately after Pearl Harbor.

Because of the attacks against Pearl Harbor, the United States — which had become disillusioned and isolationist after World War I — became a permanent actor on the world stage during and after World War II. Today, the U.S. accounts for 40 percent of the world’s military expenditures and has troops stationed around the globe, including in Japan.

On the 74th anniversary of the Pearl Harbor attacks, America must keep these lessons in mind as we confront the challenges of the 21st century.