The first witnesses in the trial of William Rapetti, the master rigger of a 200-ft-high tower crane that had a deadly collapsed off a rising Manhattan condo in 2008, were a firefighter and a man he found “buried alive” in the rubble.

Prosecutors accuse Rapetti of causing the accident that killed seven and brought both men to the debris heap by negligently installing the crane’s slings. Rapetti could spend up to 27 years in prison for multiple charges of manslaughter, criminally negligent homicide, assault and reckless endangerment.

His attorneys maintain the collapse was not his fault, and they had no questions for the men, who did not testify about any questions of Rapetti’s responsibility.

Called as the prosecution’s first witness, rescue worker Juan Henriquez described arriving at the scene of the collapse. “We could hear screams, and we just began to dig,” he said, until he saw the “very pale, anxious and nervous” figure of John Gallego, who was only visible from his head, neck and shoulder.

Henriquez inserted an IV into his jugular to hydrate him with saline, as other firefighters attempted to pull him to the surface. He recalled being concerned that Gallego’s leg would have to be amputated in order to extricate him, but rescue workers were able to free his leg and get him out after he was trapped for four hours.

After Henriquez finished his testimony, Gallego limped to the witness stand with his cane and told about how he was “buried alive” on March 5, 2008.

On the morning of the collapse, he said he was returning to his second floor apartment on East 50th Street, just a block away from the building rising on East 51st Street, to sip a cup of coffee and watch TV. Then, he said he heard a “crashing.”

He remembered rushing over to the window of his building, which was crushed by the crane, and, “The next thing [I knew],” he said, “I was buried alive.”

“The prosecutor played a recording of his panicked emergency phone call. The operator struggled to calm him down as he screamed, “Please help me” and tried to communicate that he was trapped under his building.

His face and body tightened as he was made to listen to the conversation again on the witness stand.

Gallego kept his legs after five surgeries that left multiple scars. He then left the hospital in a wheelchair and went to his mother’s house. After extensive physical therapy, he was able to use a walker, and graduate to a cane. But he says he still does not know if he will ever be able to walk without it again.

The court is expected to hear testimony this morning from an OSHA investigator familiar with the accident.