A customer managed to grab $400 in stolen cash from a fleeing crook at a Brooklyn Chinese restaurant during a robbery last month, police said Monday.

The Hong Kong Cafe in Bedford-Stuyvesant was nearing closing time on Feb. 13th when the robber walked in, posed as a customer and hopped the counter when the worker turned away.

The man swiped $400 and tried to run. But he was confronted by a customer who quickly perceived what was happening and took matters into their own hands.

A struggle commenced and the Good Samaritan wrestled the robber to the floor, retrieving the stolen $400 in the process.

The perp managed to escape out the front door and fled north on Franklin Ave.

Police say that the workers at Hong Kong Cafe were not familiar with the Good Samiritan, who returned the money to the restaurant when the struggle was over.

The robber was described as a black male and was last seen wearing a gray jacket, a black hooded sweatshirt and blue denim jeans.