Cooley made one more big stop before the period was through, sliding to his right to snag a Hughes attempt from the left side after a three-way passing play in the Flames defensive zone.
Markstrom and Ryan Lomberg almost came together late in the period two, the pair racing for a loose puck inside the New Jersey zone. The two nearly collided, then Markstrom and a trailing Klapka clipped wings in the left circle, Markstrom's catching mitt flying off his left hand, but play continued without further incident.
In the third, Cooley stopped Nico Hischier on an early breakaway. The Devils captain sought to place the puck five-hole, but the Calgary netminder made a slick stick save to keep the puck at bay.
The Flames' best chance of the third came just past the midway mark. A broken play allowed Morgan Frost to secure the puck on the right flank, he set up linemate Joel Farabee net-front, but Markstrom got a glove to the winger's backhand attempt.
In overtime, the Devils got possession, then made it count =when Nemec chopped his eighth of the season past Cooley.
Gridin's second-period helper was his first career NHL assist.
Cooley made 29 saves in goal for the Flames.