When investigators discovered the remains of Mackenzie Lueck, the slain University of Utah student’s body had been charred with her arms tied behind her back — and she had a 2-inch hole in her skull, prosecutors revealed on Wednesday.

The grisly details were released as the man suspected of killing the 23-year-old woman, Ayoola Ajayi, was formally charged with aggravated murder and kidnapping, obstruction of justice and desecration of a human body.

The 31-year-old former IT worker was the last person Lueck communicated with before she vanished on June 17.

She had just returned from a trip to her California hometown for her grandmother’s funeral when she took a Lyft from the airport to meet Ajayi. A short time later her phone was turned off and never turned back on.

District Attorney Sim Gill said the bubbly sorority girl died of blunt force trauma to the head.

After she was killed, Ajayi, who did a brief stint in the Army National Guard, poured gasoline on her body and burned it, prosecutors said.

Police discovered her charred phone in the backyard of Ajayi’s home in Salt Lake City, as well as a bone, muscle tissue and part of Lueck’s scalp, Gill said.

A neighbor had reported a fire and a “horrible smell” coming from the yard the day Lueck disappeared, Gill said.

Investigators found Lueck’s remains last week in a shallow grave in Logan Canyon, 85 miles from Salt Lake City.

“Mackenzie’s arms were bound behind her back by a zip tie and rope. A 5-centimeter hole was located on the left side of her skull with part of her left scalp missing,” according to the charging documents.

Ajayi was arrested June 28 during the search for Lueck. Prosecutors said they didn’t strike a deal with him to find the student’s body.

Gil said Lueck’s family “asked me to express on their behalf the generosity of so many strangers and friends.”

“They are genuinely appreciative and moved by the outpouring of love and compassion.”

Ajayi, native of Nigeria who is now a US citizen, is expected to appear in court Monday.

With Post wires