In the story, fighter-monks from the Shaolin Monastery eventually defeated the invaders, and were rewarded by the Emperor.