Warning: Graphic content.

A nearly 600-foot-tall construction crane came crashing down onto buildings, pedestrians and parked cars along a downtown Manhattan street Friday morning, killing a Harvard-trained mathematician on his way to work and injuring three other people.

Workers were attempting to secure the tower crane in the middle of a short but blustery snowstorm when the crane collapsed onto Worth Street near Church Street in Tribeca at around 8:25 a.m., officials said.

“When it came down, it felt like an earthquake. Our building rattled, shook,” Paul Capotosto, treasurer of the NYPD’s Sergeants Benevolent Association, whose office is nearby, told The Post.

Officials from the Buildings Department had stopped by the construction site early Thursday morning to inspect the crane and had approved an extension to its maximum length of 565 feet, officials said.

The crawler crane — which moves on caterpillar tracks and was installed at the site on Jan. 30 — was at that full length for the first time when it crashed amid winds topping 20 mph.

David Wichs, 38, was killed instantly when the crane pinned him to the snow-lined street, police and witnesses said.

“I checked to see if there were any signs of life. There were none,” said Lt. Jason O’Connor, a commanding court officer at a nearby courthouse who rushed over to the chaotic scene.

Just feet away, Thomas O’Brien, 73, sustained a head injury when the crane smashed into the roof of his black Jeep, shattering his sun roof. Video shows him clutching his head through the crushed car.

“He was conscious and alert, but he was trapped,” O’Connor said, adding that the man’s body was contorted inside the car, pinned in by a piece of the crane’s 565-foot-long boom.

O’Brien’s daughter was frantic as they waited for equipment to pry him loose.

“She said she wanted to be with her father, but we kept her away,” O’Connor said.

A 45-year-old New Jersey woman, Dawn Kojima, also suffered a head laceration and leg injury in the crash.

A firefighter responding to the scene suffered minor injuries, officials said.

Witnesses remarked that the damage — and death toll — could have been far worse.

“It’s usually crowded on Worth,” said electrician John Rizzo, 43. “It’s lucky this happened today. If it had been a nice day, there would have been bodies everywhere.”

The crane, which had been doing work on 60 Hudson St., was in the process of being lowered as winds approached the danger mark of 25 mph, Mayor de Blasio said.

“No work was done this morning because the crew made the decision to bring the crane down to the secure position,” the mayor said.

But at some point, workers lost control, and the crane plummeted to the ground, with its length stretching across two blocks.

“I thought they were trying to maybe get it down in one shot, but then the cab flipped over . . . I thought, I hope there are no pedestrians down there,” recalled Chris Andrinopiupous, 38, an electrician who was watching from the 38th floor of his nearby building.

The crane struck several buildings on Worth Street during its descent, cutting a swath of wreckage. Its giant hook crashed into an office of the New York Law School.

“When it landed it, was a big impact,” said Nicholi White, 20. “There was a loud bang and the sound of alarms going off. Then everything got quiet. I saw the cars in half. I was in shock.”

More than 140 firefighters flooded into the area, as several bystanders jumped in to help.

Capotosto said he and two other SBA officers rushed out of their building and into the wreckage.

There they found O’Brien trapped in his car, and Kojima leaning against a building, blood trickling down her forehead.

Many buildings in the area were evacuated, including the courthouse at 71 Thomas St., and gas lines were cut off along Worth Street. The FDNY and Con Edison scanned the scene for gas leaks every 15 minutes.

Officials have yet to explain why exactly the crane capsized, but one expert explained that a 565-foot boom is devilishly tricky to lower.

“It will take hundreds of tons just to counterbalance that boom, and if you do it too quickly, it could be thrown off balance,” said James Pritchett, president of Crane Experts International, which investigates such mishaps.

The crane’s operator, Kevin Reilly, 56, has a record of three DWI arrests, all from the 1980s.

He was questioned by cops after the collapse and submitted to a Breathalyzer test, blowing a clean .000, law-enforcement sources said.

Locals said the crane’s looming presence had been making them nervous all week.

“When you look from my office, you see this thing 40 feet up in the air, it looks very unstable,” said Peter Allen, an architect who works nearby.

Additional reporting by Khristina Narizhnaya, Megan ­McGibney, Natalie Musumeci and Laura Italiano