The Florida high school massacre dredged up nightmarish memories for the mother of one of the surviving students — who cheated death herself during another mass shooting only a year earlier.

Annika Dean — whose son Austin had texted “I love you, just in case” as he hid out during the rampage — was inside the Fort Lauderdale-Hollywood Airport when a madman opened fire on Jan. 6, 2017, killing five people.

“I definitely had a sense of what he was dealing with and going through and there was nothing I could do. I was just grateful for every text he was sending me,” Annika Dean told West Palm Beach television station WPTV.

“It’s different when it happens to your kid.”

Her son, a 14-year-old freshman at Marjory Stoneman Douglas High School in Broward County — about 31 miles from the airport — was one of about 30 kids who sought cover in a Junior ROTC classroom, where a hero cadet covered them in sheets of Kevlar.

“There’s a school shooting drill. It’s really scary, they fired a gun. IT’S NOT A DRILL,” he texted his mom at 2:42 p.m. Wednesday, as a troubled former student prowled the hallways with an AR-15 semi-automatic assault rifle, randomly picking off students and staffers.

“He described that people had been running and screaming and he told me he was on lockdown,” said Dean. “He said, ‘I love you, just in case.’”

Dean’s own experience then flashed back, as she recalled hiding behind a cart and being shielded by a stranger during the airport attack.

Afterward, Dean told the station that she was “most grateful for every moment now I have with my kids.”

And she also used the close call as a teaching moment.

“I have talked to my kids, sometimes when we’re walking through grocery stores, I’ve asked them, ‘What would you do if this happened, where would you go, where would you hide?’” Dean said.

She was relieved that Austin survived — but anguished for two of her best friends.

One’s daughter was killed in the massacre, and another’s died in the hospital.

“They were my Sunday school students. They’re just really on my mind right now,” she said.

Meanwhile, she was stunned by the surreal fact that both she and her son underwent such terrifying experiences.

“It’s incredibly rare. My brother said, ‘You’re either one of the luckiest or the unluckiest’ and I said it’s both. It’s both,” she said.

In the airport shooting, Esteban Santiago, 26, allegedly killed five people and wounded six others with a handgun. He is expected to go on trial in June.

In the school shooting, Nikolas Cruz, 19, was charged with 17 counts of premeditated murder. Cops say he confessed.