North Koreans raise their fists during a rally in 2010 in front of the U.S. Navy spy ship Pueblo, which was captured by North Korea in 1968. (AP)

The electronic spy ship Pueblo, which sat in international waters off the coast of North Korea, was on its first voyage there when a group of North Korean ships and aircraft attacked it Jan. 23, 1968, and forced its captain to bring the ship to the port of Wonsan.

Before the North Koreans boarded the Pueblo, its crew rushed to burn classified documents and destroy the code machines and eavesdropping equipment that were at the heart of the ship's mission -- gathering signal intelligence and other information from the closed, totalitarian nation that remains one of the United States' greatest security threats.

For almost a year, the ship's crew, led by Cmdr. Lloyd "Pete" Bucher, was tortured and interrogated by the North Koreans. They suffered from near-starvation and post-traumatic stress disorder. In Washington, President Lyndon Johnson and his team, preoccupied with the worsening war in Vietnam, struggled for ways to free the ship and its crew without triggering another war in Korea that could spread and involve China and the Soviet Union.

The plight of the Pueblo and its crew, as well as the stakes for U.S. intelligence and security, is told by author Jack Cheevers in the new book Act of War: Lyndon Johnson, North Korea, and the Capture of the Spy Ship Pueblo. Long forgotten or never learned by most Americans, the capture of the Pueblo and its intelligence information was one of the worst losses in U.S. history, Cheevers wrote.

"One key document I uncovered was a secret, 236-page history of the Pueblo affair, written by the National Security Agency in 1992, indicating that the ship's capture was one of the biggest intelligence debacles in U.S. history -- 'everyone's worst nightmare,' as one NSA historian put it," Cheevers told USA TODAY.

A former reporter for the Los Angeles Times, Cheevers made several discoveries in Act of War, including:

■ An internal White House report conducted while the Pueblo was still in captivity that determined the fault for the ship's loss was with high-ranking Navy leaders who sent the ship into dangerous waters without adequate preparation and equipment.

■ How the loss of the Pueblo's intelligence was aggravated by a spy ring run by a Navy enlisted man, John Walker, who sold the Soviets classified intelligence information that allowed U.S. enemies to compare that with the data collected from the Pueblo. Walker, his son and other associates were not arrested until 1985. "Thanks to the traitorous radioman, the Russians knew the tactics American aircraft carriers would use in wartime and how to sabotage U.S. spy satellites," Cheevers said.

■ The previously classified NSA history that calls the loss of the Pueblo one of the worst security breaches ever.

The world is familiar with North Korean provocations, such as the launch in recent years of missiles potentially capable of carrying one of the handful of nuclear weapons the country could have. Its leaders, including dictator Kim Jong Un, routinely threaten neighboring South Korea or the United States. Kim recently had his uncle, Jang Song Thaek, a longtime military leader, executed as part of a power struggle for control of the military. Since Kim's grandfather, Kim Il Sung, invaded South Korea in 1950, North Korea has repeatedly attacked U.S. and South Korean interests.

That was never more apparent than in 1968, when shortly before the Pueblo capture, North Korean commandos slipped into South Korea and launched a series of attacks, including a failed attempt to assassinate South Korean President Park Chung Hee. That attack set both nations on edge, and the Pueblo was sent unaware into the waters off North Korea shortly afterward. It is clear in Act of War that the Pueblo was seen by North Korea as part of a military response by the United States.

Bucher's commanders sent him into the area without adequate knowledge or the means to defend himself and his crew, Cheevers said.

"Bucher is a classic example of a front-line officer placed in a no-win position," Cheevers said. "No one in the Pentagon or the White House anticipated that North Korea would attack the Pueblo, and the lightly armed surveillance ship hadn't been assigned any protection by air or sea. As the then-chairman of the Joint Chiefs of Staff, Gen. Earle Wheeler, acknowledged in a secret memo, the Pueblo was a 'non-combatant.' "

After 11 months of torture and starvation, the crew of the Pueblo was released in December 1968 after a series of negotiations with the North Koreans and a false apology by the United States. The crew returned home to a nation weary of war but overjoyed by their safe homecoming. Bucher and his fellow crewmembers were treated as folk heroes by most Americans.

But not all, Cheevers wrote. Many Navy leaders believed Bucher gave up too easily and violated the service's cardinal rule against giving up a ship without a serious fight. The Navy convened an inquiry that threatened to veer into a witch hunt to make Bucher the scapegoat. After weeks of testimony, the panel of five admirals recommended that Bucher be court-martialed for his role in the ship's capture. Navy Secretary John Chafee, a former Rhode Island governor and later a U.S. senator, overruled their recommendation, saying Bucher and the crew had "suffered enough."

Bucher returned to active duty after the inquiry, but his career was effectively over after the Pueblo incident. He wrote his memoirs, which Cheevers wrote he found at a used bookstore. That led to a series of interviews with Bucher and the decision to write Act of War. Bucher died in 2004.