A five-year-old girl has allegedly been indecently assaulted by three older students at a primary school in Sydney's south-west.

Police are investigating allegations that the girl was attacked on Wednesday afternoon.

A NSW Police spokeswoman said officers went to the school on Thursday.

"Officers from Fairfield Local Area Command attended the school and are investigating," the spokeswoman said.

The students have not yet been charged and the school involved cannot be named.

A NSW Department of Education spokesperson said: "This matter is currently under police investigation. The Department of Education is working closely with NSW Police."

The incident comes after two boys were charged with sexually assaulting a six-year-old girl at a northern beaches primary school in August.