A Brooklyn grandfather died of a heart attack while locked inside a McDonald’s bathroom because clueless workers couldn’t figure out how to open the door, his relatives charge in a new lawsuit.

Anthony DeNicola’s family filed a $10 million suit in Brooklyn Supreme Court Wednesday saying he was in cardiac arrest and didn’t get CPR in time because of the bumbling Bensonhurst fast food employees.

It took firefighters 15 minutes to finally break the door down, the suit says.

DeNicola, 67, a commercial truck driver, was having coffee and breakfast with his friends at the 86th Street McDonald’s in June 2013 when he went to the bathroom.

When he didn’t come back after several minutes, his worried pals called his cellphone and knocked on the bathroom door but got no answer.

“If somebody could have opened the door, they could have started CPR on him until emergency workers got there,” said his son, Anthony DeNicola Jr., 38.

“What if somebody had been able to open that door? He’d still be here.”

Family lawyer Stephen Spinelli said there was no way to unlock the door from the outside when the deadlock was engaged and McDonald’s workers were unhelpful.

Anthony DeNicola with his grandsons

“A bystander ran to the nearby fire station and the firefighters came back with their equipment and forced the door open — they had to break into the bathroom,” said Spinelli.

“To this day, there are still crowbar marks on the door,” said DeNicola Jr., who bashed the eatery’s workers for failing to help his dying dad.

“They were saying, ‘There’s nothing we can do. What do you want us to do? We can’t get in.’ They were definitely no help, either the workers or the managers,” accused DeNicola, whose 7-year-old son tragically died last year after an allergic reaction.

“While plaintiff was a customer at the aforesaid location, he entered the restroom, became ill and was caused to become trapped in the restroom no allowing help to get to him inside the restroom since the door was deadbolted from the inside,” the lawsuit states.