Officers held former Giants defensive lineman Barry Cofield at gunpoint while ordering him out of his car last summer after a police pursuit, new video shows.

The footage, obtained by TMZ Sports, shows an officer frantically ordering Cofield, 34, out of his Cadillac Escalade moments after police said the 6-foot-3, 300-pound lineman was found passed out behind the wheel and rammed a police vehicle during an ensuing pursuit in July.

“Get out of the car!” one cop shouts at Cofield, who initially ignores the command. “Get out of the car now! Get out of the car! Get out of the car or we’ll shoot! Get out of the car now!”

A second officer is then heard saying to “get somebody over here with Mace” as one cop begins repeatedly bashing the window of Cofield’s car to take him into custody.

“It’s not breaking,” the officer says.

Cofield is then seen opening the driver’s door as at least two officers held him at gunpoint, ordering him immediately to the ground, video shows.

“Get on the ground!” one officer yells. “Get on your face!”

One officer later finds a plastic bag inside Cofield’s pocket, saying it appeared to contain cocaine residue or possibly LSD, video shows.

“There we go,” the officer said. “There it is.”

Police said the substance later tested positive for heroin. Cofield, whose breath also smelled of alcohol, also refused a sobriety test, authorities said.

Cofield, a 10-year NFL vet who last played in 2015 as a key piece of the Giants’ Super Bowl win over New England, secured a deal from prosecutors last week that will allow him to potentially avoid prison time in the case after pleading no contest to heroin possession and DUI causing damage or injury.

If Cofield steers clear of other legal issues, he will face 12 months of probation, 50 hours of community service, random drug testing and a $500 fine. He will also have to attend DUI classes and a victim awareness panel, as well as having his vehicle impounded for 10 days.

Police found Cofield, a Cleveland native, passed out behind the wheel near Interstate 4 and Lake Mary Boulevard in Lake Mary with his foot planted on the brake, leaving his Escalade stopped at a light for several cycles, according to an arrest report.