The headline of this story has been corrected. For more information, see the note at the bottom of the story.

PORT ST. LUCIE, FLA. — Omar Mateen’s anti-American ideology was evident to residents here as early as Sept. 11, 2001, when the New York City-born terrorist cheered the collapse of the World Trade Center while watching the attack on TV in his high school classroom, a childhood friend said.

Aahil Khan, 28, of Fort Pierce, Florida, said he used to hang out with Mateen after school when the now infamous gunman attended Martin County High School. He recalls Mateen telling him he’d been suspended for “cheering” in class as Mateen and his classmates watched the 9/11 attacks unfold on TV.

“He said some of the kids beat him up” after school for lauding the acts of terror.

“He didn’t hide it,” Aahil Khan said of Mateen’s happiness at attacks on New York and Washington, D.C. “He said they suspended him because he was yelling to everyone that it was a good thing. He was the only one there who wasn’t upset that they attacked.”

advertisement | advertise on newsday

“I feel like that was a big moment in his life, seeing” the attacks.

Khan said it was clear even then that Mateen was mentally ill.

“I felt sorry for him,” said Khan, who lost touch with Mateen after high school and believed his former friend was depressed, somewhat delusional and paranoid. “He couldn’t control his emotions.”

Khan’s account was among a number of recollections shared Monday by former friends and fellow worshippers who knew the Orlando gunman, a man one federal law enforcement source with knowledge of the investigation called an apparent “classic lone wolf” terrorist inspired by the Boston Marathon bombers, the Islamic State group and terrorists like radical Islamist cleric Samir Khan, formerly of Long Island, who was killed in an American drone strike in Yemen in 2011.

A search of Mateen’s Fort Pierce apartment by the FBI uncovered other evidence of his radicalization — including online records and notes about jihadist ideology, the source said. The residence also contained run-of-the-mill items like clothes and housewares, as well as Batman, Spider-Man and Ninja Turtles toys — trappings of Mateen’s life as a middle-class, married father of a 3-year-old boy. A number of books about the Muslim faith and Islamic texts were also found in the apartment, he said.

Mateen appeared devout, those who knew him said. When he wasn’t working as a private security guard for G4S, the global security firm formerly known as Wackenhut, Mateen often spent time attending prayer services at the Islamic Center of Fort Pierce or lifting weights at Gold’s Gym in Port St. Lucie.

Members there said he worked out several times a week, rarely interacting with other weightlifters.

“He was definitely a strong kid,” said gym-goer Jason Hart of Port St. Lucie. “He always looked intense. Like he was training. It’s kind of eerie to think about that now.”

advertisement | advertise on newsday

Mateen would sometimes come to prayer services straight from the gym, changing from workout clothes into traditional Islamic garb. Other times, he had his son in tow. Mateen’s sisters, father and other relatives also regularly visited the center, worshippers there said. He last attended prayer services on Friday, they said.

“He would bring his son and pray, usually, always in and out,” said Saeed Afzal, of Fort Pierce, who attends services there. On Friday, Mateen attended alone and stayed longer than usual, Afzal said.

“No one knew he would do this.”

Investigators learned over the weekend that Mateen legally purchased weapons used in the attack at the St. Lucie Shooting Center and also attempted to buy body armor at a store in the area before the shooting, the source said.

On Monday, the shooting center’s owner, a former NYPD detective named Ed Henson, told reporters Mateen purchased a long gun and a handgun at his store about 10 days before.

advertisement | advertise on newsday

“An evil person came in here and they legally purchased two firearms from us, and if he hadn’t purchased them from us, I’m sure he would have gotten them from another local gun store,” Henson told reporters outside his business.

“He passed the background check that every single person that purchases a firearm in the state of Florida undergoes.”

Mateen appeared comfortable using firearms, the source said, having fired at shooting ranges in the area, and obtained a gun permit for his security work.

At one time, investigators believe, Mateen wanted to be a police officer.

He received his associate of science degree in criminal justice technology from Indian River State College in 2006, the school confirmed Monday. He also worked briefly as a state correction officer in 2006 and 2007, officials said.

Before moving to Florida, Mateen — who records show was born in New Hyde Park — and his family lived in Westbury and Flushing, Queens, records show.

Mateen’s father, Seddique Mateen, spoke to reporters at his Port St. Lucie home Monday, saying of Saturday’s mass shooting: “I was in shock. My whole family was in shock.

“As a father, I don’t want any father to go through what we are going through.

“What he did was completely an act of a terrorist.

“I condemn what he did. I wish I did know what he was doing . . . ,” he added. “I’d have arrested him myself.”

CORRECTION: This story previously appeared with an incorrect headline that identified a source differently from what appeared in the story. The story identifies the source as a friend, not a classmate. This story was written by former Newsday reporter Kevin Deutsch; the headline was not. Newsday is reviewing this story, and all of Deutsch’s work from the four years he was employed at Newsday, after questions have been raised about the accuracy of a nonfiction book he wrote about Baltimore’s drug culture called “Pill City.” When the review is complete, Newsday will report the findings.