On Wednesday, July 17, 1996, at 8:19 p.m., TWA Flight 800 took off from JFK airport and headed out over Long Island toward Paris. It was a perfect summer night, 70 degrees, the sky clear.

Twelve minutes later, TWA 800 exploded mid-air, killing all 230 people on board. The crash was close enough to the coast that plane wreckage washed up on Suffolk County beaches for weeks.

“There was a wall of flame 30 feet high,” Suffolk County police officer Vincent Termine, who witnessed the explosion, told the Independent in 1997. He said it looked like the ocean was on fire.

Termine headed out to sea with rescue crews immediately. “We tried to get close to a piece of burning wreckage at the beginning,” he said. “I remember operating the boat between flames. But we couldn’t get close enough. The smoke was making us sick. One of the guys had to throw up over the side.”

Twenty years later, the crash of TWA 800 remains a subject of horror and fascination: For many New Yorkers, especially Long Islanders, the plane’s sudden, complete explosion remains a traumatic event. It was just five years before 9/11, and there was already a growing anxiety about terror attacks on the US homeland.

Perhaps for that reason, conspiracy theorists still insist that TWA 800 was brought down, deliberately or accidentally, potentially by the US military — despite a four-year-long investigation, the most expensive in aviation history, which found that a short circuit in the plane’s center wing fuel tank caused the crash.

In his new book “TWA 800: The Crash, the Cover-Up, and the Conspiracy” (Regnery), author Jack Cashill maintains that the plane was brought down by external forces and that the government has engaged in a decades-long cover-up.

While Cashill rehashes old conspiracy theories — a US Navy ship, which was in fact in the area, conducted a wartime exercise gone awry, or a terrorist on the ground used a shoulder-mounted surface-to-air missile, or a small plane collided with the 747, or a terrorist smuggled a bomb on board — it’s telling that, 20 years later, these theories still find traction.

Multiple factors contribute. Never before had a 747 been brought down by such a malfunction. It was a time of high anxiety: In the summer of 1996, Ramzi Yousef stood trial in lower Manhattan for the first World Trade Center bombing. The Oklahoma City bombing, which killed 168 people, 19 of them children, took place the year before. The Olympics were days away in Atlanta, and that city was on alert for terrorist attacks.

It was also a presidential election year, and theorists believed the Clinton administration had cause to engage in a cover-up. The internet was in its infancy, and this mystery became one of the first stories to go viral.

On Nov. 8, 1996, Jim Kallstrom, then-FBI assistant director, was forced to hold a press conference denouncing the mushrooming conspiracy theory that the US government was involved.

“What we can say is that the United States military did not shoot a missile at this airplane,” said Kallstrom, who lost a close friend in the crash. “The United States military did not shoot anything. Nothing, nothing like that has taken place, would take place, would ever take place under any circumstances.”

In 2013, a group calling itself the TWA 800 Project, composed of some surviving family members as well as skeptics, petitioned the National Transportation Safety Board for a new investigation. They insisted that “ a detonation or a high-velocity explosion” caused the crash.

One year later, the NTSB denied the request.

“Before responding to the petition, NTSB staff met with the petitioners’ representatives and listened to an eyewitness who described what he saw on the night of the accident,” the board posted on its official site. “After a thorough review of all the information provided by the petitioners, the NTSB denied the petition in its entirety because the evidence and analysis presented did not show the original findings were incorrect.”

Author Cashill doesn’t offer a definitive alternate cause, but the strongest portion of his book are reprints of multiple witness statements, taken by the FBI and CIA in the immediate aftermath. Over 700 of these have since been made public; in them, 258 witnesses told investigators they’d seen a streak of white light approaching the aircraft before the explosion. A few witnesses used the word “rocket” or “missile” in describing what they saw.

These vivid, first-hand accounts remain in stark contrast to the final report — and at the time, every possibility was investigated. The government rented a 747 to recreate the flight. They placed a bomb in another and blew that up. They launched missiles to determine if eyewitnesses could spot them — they did.

Years later, Leon Panetta, Bill Clinton’s chief of staff at the time, said that terrorism was initially their main suspicion.

“The investigation was looking at almost every possibility, including state actors, because we’d known that Libya had been involved with regards to bringing down the airliner over Scotland [Pam Am Flight 103],” Panetta told CNN in 2014. “We were looking at Iraq and Saddam Hussein. We were looking at, you know, the possibility of even Iran might have played a role in this.”

These initial possible scenarios, when added to the real-time eyewitness accounts taken by the FBI and CIA, are likely why TWA 800 conspiracy theories linger.

Witness 364 , who had once served as the crew chief of a Marine Corps helicopter squadron, was sitting on the dock of the Bellport Yacht Club with a female friend. Looking to the southeast, he “noticed an object rising vertically.”

It had a red glow and took about thirty seconds to reach its zenith, then arced downwards for ten seconds, and sped off on a flat, horizontal course for about fifteen seconds. The witness then saw a small red explosion, followed by a “tremendous” bright white second explosion, which evolved into an orange-yellow ball that fell in two pieces to the sea.

“He realized he had seen two different things,” reported the FBI, “namely the rising ‘object,’ and the subsequent explosions.”

After learning of TWA 800’s destruction, “He came to the personal conclusion that what he had seen was a missile hitting the airplane.”

Witnesses 385 and 386, a couple with their young children, were boating in the Moriches Inlet. They told the FBI that a bright orange-red glow “seemed like it came off the horizon and rose slowly, weaving as it continued upward.”

It traveled diagonally at a seventy-degree angle going in a westerly direction and left a white smoke trail in its wake. It then disappeared, and a “large oval ball of fire” appeared just above where the object was last sighted. The two heard no sound as they watched as “the ball of fire came straight down,” breaking eventually into two pieces.

Witness 491 was fishing with some buddies off a dock in Center Moriches when he “observed a red light moving up into the air.” It was moving in an “irregular type arc” in a southeasterly direction.

He followed this “red flare” for an estimated thirty seconds and felt it “was trying to follow something.” The flare then suddenly “turned into a huge ball of flame and fell in two pieces.”

— Witness statements as excerpted from “TWA 800: The Crash, the Cover-Up and the Conspiracy” by Jack Cashill., out July 5.