What felt and sounded like a series of mini-earthquakes to many alarmed Long Islanders turned out to be sonic booms triggered by a U.S. Navy stealth fighter jet tearing across the sky on a Thursday afternoon test flight, military officials said.

The single-seat fighter jet rattled windows, jarred structures and alarmed coastal dwellers from New Jersey to New York to Connecticut, according to people who heard it.

In a statement Thursday night, Defense Department spokesman, Lt. Col. Thomas C. Crosson, said the F-35C is based at Naval Air Station Patuxent River, Maryland.

Crosson said the jet “was conducting supersonic testing in a cleared military flight area off the east coast earlier today.”

The source of the sonic booms first heard in the early afternoon, remained a mystery until a Defense Department spokesman confirmed later in the day they came from a fighter jet.

Diane Bates, 48, of Amityville, said she felt “tremors” outside her Bayside Place home at about 2:30 p.m. She first thought a passing truck caused the boom “but when it happened again and then a third time, and I saw the blades of my ceiling fan move, I thought it had to have been an earthquake.”

Officials with the U.S. Geological Survey immediately ruled out an earthquake and swiftly determined it was a sonic boom.

At Jones Beach, a maintenance supervisor, working in his office, initially thought a truck had slammed into a loading dock, according to George Gorman, Jr., deputy regional director, New York State Office of Parks, Recreation and Historic Preservation.

advertisement | advertise on newsday

“But when he went out, there wasn’t a truck there,” Gorman said. “That’s when he thought it might have been an earthquake.”

When Gorman inquired further, park employees told him: ‘‘ ‘It’s still happening,’ they felt several tremors afterward,” he said.

Sonic booms can register at close to 200 decibels, making them nearly twice as loud as thunderclaps. They are caused by shock waves produced when an aircraft exceeds the speed of sound.

The stealth fighter blamed for Thursday’s thud-like concussion — a sleek and powerful long-range fighter well suited for short-burst take offs from aircraft-carriers — can register a top speed of more than 1,220 mph.

Sound travels at about 770 mph, so when a high speed fighter jet passes overhead, sonic booms are not unusual.

@Newsday

Crosson said the Navy unleashes almost daily supersonic flights for offshore testing and training purposes above the Delmarva Peninsula in Delaware, Maryland and Virginia. Crosson said the Navy has taken precautions to minimize the impact of testing on communities below.

“However, under certain atmospheric conditions there is an increased potential to hear the sound,” he said.

Some Long Islanders reacted to the booms by calling the police. Others reported their reactions on social media.

On Twitter, @dianembates said she felt the tremors in Amityville. Also on Twitter, @Lilah425 wrote that she felt one small earthquake followed by a few aftershocks in Massapequa.

A statement from Suffolk police said, “They received approximately half a dozen calls about a possible earthquake this afternoon. There was no damage and no injuries.”

advertisement | advertise on newsday

The police department said it fielded calls from West Islip, Amityville, Dix Hills and Stony Brook.

With Laura Blasey and Rachel Uda