A game of Oz Tag took an unsporting turn when a player allegedly assaulted a referee, knocking him unconscious.

NSW Police said two teams were playing the popular touch football game at a sports field in St Marys in Sydney's west on Thursday evening

Referee Travis Kelly sent player Trevor Riley off for making inappropriate comments.

Police allege Riley, 22, approached the referee and punched him in the face, causing him to lose consciousness.

Emergency services treated the referee at the scene and the player allegedly ran away. The referee was taken to Nepean Hospital with an injury to his jaw.