Investigators are looking into whether a Las Vegas man who went on a deadly shooting spree in Manhattan Monday was targeting the National Football League after it emerged that the gunman was a former Los Angeles high school football player with a documented mental health history.

New York Mayor Eric Adams said Tuesday that the gunman, identified by law enforcement officials as 27-year-old Shane Tamura, was trying to target the N.F.L but took the wrong elevator.

Law enforcement officials have said that the gunman marched into a 44-story office tower on Park Avenue that is the headquarters of the National Football League and investment firm Blackstone, at around 6:25 pm Monday carrying an M4 assault rifle in his right hand. He immediately opened fire in the lobby, shooting first an NYPD officer, then a woman who took cover behind a pillar and a security guard behind the security desk.

After spraying more gunfire across the lobby, the gunman got into an elevator and went to the 33rd floor, which houses the Rudin Management real estate firm. He then walked around the floor, firing more rounds and shooting and killing another person, before walking down a hallway and fatally shooting himself in the chest.

“Mr. Tamura has a documented mental health history,” New York City Police Commissioner Jessica Tisch said Monday night at a news conference, citing Las Vegas law enforcement. “His motives are still under investigation, and we are working to understand why he targeted this particular location.”

Tamura, who was a celebrated varsity high school player at Golden Valley High School in Santa Clarita and Granada Hills Charter in the San Fernando Valley, had a suicide note in his back pocket alleging that he suffered from CTE, a brain disease linked to head trauma, CNN reported, citing a source with knowledge of the investigation.

In the short three-page note, he appeared to blame football for his problems, referencing former Pittsburgh Steelers player Terry Long, who died by suicide after drinking antifreeze in 2005, and expressing grievances with the N.F.L..

“Terry Long football gave me CTE and it caused me to drink a gallon of antifreeze,” the gunman allegedly wrote. “You can’t go against the NFL, they’ll squash you,” the note said, according to the source.

“Study my brain please I’m sorry Tell Rick I’m sorry for everything,”

N.F.L. commissioner Roger Goodell reportedly said an NFL employee was seriously injured in the attack.

Tamura played football at Golden Valley High School in the Canyon Country neighborhood of Santa Clarita for three years before transferring to Granada Hills Charter School for his senior year in 2015.

Dan Kelley, Golden Valley coach, said only that he remembered Tamura as “a good athlete.”

In his senior year at Granada Hills, the 5-foot-7, 140-pound player had 126 carries, 600 rushing yards and five touchdowns, according to MaxPreps. He also won several “player of the game” awards. He graduated in 2016, the site said.

The initial investigation indicates that Tamura had traveled from Las Vegas to New York, driving a BMW cross country through Colorado, Nebraska and New Jersey over the weekend.

Law enforcement said that officers searched the vehicle the gunman double parked on Park Avenue between 51st and 52nd streets and found a rifle case with rounds, a loaded revolver ammunition and magazines, a backpack and medication prescribed to Tamura. No explosives were inside.

The slain police officer, Didarul Islam, 36, had been on the job for four years, according to Tisch. He was married with two young sons and his wife was pregnant with their third child.

The Associated Press and Times staff writer Eric Sondheimer contributed to this report.