Alleged Parkland school shooter Nikolas Cruz heaved and “vomited clear fluid” as a witness was about to identify him moments after he was arrested for the mass killing, according to a report.

He struggled to stand and hyperventilated when the witness showed up to identify him as the suspect in the deadly attack at Marjory Stoneman Douglas High School, according to a report by Coconut Creek Police Officer Michael Leonard, who collared him.

Paramedics were summoned as a precaution, according to the Orlando Sentinel, which cited the newly released report.

Cruz, 19, who was arrested Feb. 14 about 80 minutes after he allegedly gunned down 34 people at the school, 17 fatally, has remained on suicide watch in the Broward Main Jail and faces the death penalty.

He ditched his AR-15 rifle in a stairwell at the school before blending in with fleeing students and stopped off at a nearby Walmart and McDonald’s.

Leonard, meanwhile, canvassed the area with just a nominal description of the suspect to go on: a maroon polo shirt, black jeans and a ball cap.

At one point, the cop encountered a young man strolling along a sidewalk on a residential street a few miles from the school. He matched the description and also wore military-style boots and black-framed glasses.

His shirt was emblazoned with a JROTC logo and his cap featured a likeness of an NYPD patch.

When ordered to the ground at gunpoint, Cruz provided his name and lay down while cuffed, the paper reported.

“Given the magnitude of this crime and not knowing if the subject was still armed, I began to give the subject loud verbal commands,” Leonard wrote, the Miami Herald reported.

Leonard called for backup as he kept his Glock aimed at the suspect. When a second officer arrived, they searched Cruz for weapons and found none.

After about 20 minutes, Cruz “began to move his head and eyes, looking in all directions,” the officer wrote in his report. He also stated that he was having trouble hearing — possibly a result of the shooting.

Leonard calmed him down, but when the witness showed up and the officer pulled Cruz up, he “became weak and required help holding himself up.”

“Cruz also began to heave and vomit clear fluid,” Leonard wrote. “Cruz began to hyperventilate.”

The witness — whose identity was redacted in the report — confirmed that Cruz was, in fact, the shooter. The suspect was taken to a hospital before being hauled off to jail.

A plea of not guilty was entered in court for Cruz, who faces 17 charges of premeditated murder and 17 charges of attempted murder.

His public defender has said Cruz is willing to plead guilty if the death penalty is dropped.