Parkland massacre man Nikolas Cruz sneaked his “Make America Great Again” hat into his late “liberal” mother’s casket and even snapped a photo of it, a friend told a detective in a new investigative report.

The new details are among a 425-page file from the Broward County, Fla., Sheriff’s Department, The Miami Herald reported on Thursday.

A Cruz pal told the detective about the petty move against his “liberal, anti-gun-type” mother, Lynda Cruz, who died in 2017.

“Due to the fact that his mother hated Donald Trump, he put it in her casket with her when she died and took a picture of her with the hat,” the friend recalled.

Cruz, who has registered as a Republican while cooling his heels in prison, fatally gunned down 17 students and faculty inside his alma mater, Marjory Stoneman Douglas HS, on Feb. 14.

In another revelation into the 20-year-old Cruz’s troubled life, he had texted his crush that he “felt like killing people” the day before the massacre.

The creepy text was among other messages Cruz sent to the girl, a Deerfield HS student whose number was saved on his phone under the name “Warning Love of Your Life.”

The girl, who lived near a Dollar Tree store where Cruz worked, deleted the text because she was ­angry over his behavior.

She told a detective that the two never dated but that she agreed to meet up with him five days before the Valentine’s Day massacre “because he seemed depressed.”

The detective wrote that the girl “insisted that Cruz meet her in a public place because she was afraid of him,” a police report said. Angry over Cruz’s behavior, she deleted the chilling text about “killing people,” but he continued to barrage her with phone calls.

With the romantic holiday the very next day, Cruz told her he wanted to be her boyfriend and Valentine. When the girl rejected him, Cruz told her he was going to see a therapist before concluding a phone call with a threatening-sounding “goodbye.”

On the day of the shooting, Cruz called his crush and messaged her incessantly as she was taking a test at her own school. Some of the messages included photos of “old scars” on his arms, the report said.

The lengthy police report also revealed that Cruz had Googled, “How long does it take a cop to show up at a school shooting?” and posted videos of himself threatening to shoot up the school.

“Hello. My name is Nik and I’m going to be the next school shooter of 2018,” he said in one recording released in May. “My goal is at least 20 people with an AR-15 . . . Location is Stoneman Douglas in Parkland, ­Florida.”

Cruz faces the death penalty.