Thankfully, it didn't go off as planned.

A secret FBI test of a correctly made version of the Times Square bomb revealed that it "would have killed thousands of people" if it had been made to explode as terrorists had intended, law-enforcement sources told The Post yesterday.

Had he built the Times Square device the way he had originally intended to, terrorist Faisal Shahzad, would have turned his SUV and nearby vehicles into a fatal spray of razor-sharp fragments and transformed building windows into glass guillotines hurtling to the streets, cutting down hundreds of people walking by.

The results were discovered after feds composed the type of bomb Shahzad set out to make -- with the exact components he had initially intended to use -- and exploded it in Pennsylvania last month.

"It would have been the biggest thing ever to happen in this country since Sept. 11," another source said.

"It definitely would have been bigger than [the 1995] Oklahoma City" bombing of the federal building that killed 168 people, the source said. "There would have been a lot of casualties."

"People would also have been stomped to death from running away. It would have been panic. The buildings would have been severely damaged."

One source added: "If you look at the four corners [near the bomb] that night, there could easily be 500 people between 20 to 30 feet from the car.

"Any car going down that block or parked nearby would have been turned into fragments, because that SUV's going to rip apart those cars. More people get killed by the fragments than the actual explosion."

Shahzad's homemade bomb -- on which he substituted less effective, cheaper components for the more expensive and deadly components he had planned to use -- was left in the back seat of his parked SUV in the middle of Times Square, where it smoldered but failed to detonate.

Street vendors noticed the smoke and alerted police. The cops quickly evacuated the tourist-packed area as they dismantled the device.

Shahzad, 30, was nabbed several days later trying to flee the country. Last month, he pleaded guilty to federal terrorism charges, saying he wanted to attack America in retaliation for US military killings of Muslims abroad.

At the end of June, the FBI built its replica of the bomb and exploded it outside Harrisburg, Pa., to test its destructive force, sources said.

The results of the explosive test were sobering -- showing that Shahzad was on track to becoming the biggest individual mass murderer in US history, several sources said.

"This attempt failed," one source said. "But no one thinks this is the only time someone is going to try to blow something up in Times Square."