Children who take up team sports before the age of eight and play for at least two years are more likely to be healthier, have better relationships and do better at school than those who do not, an Australian study says.

This is particularly true for girls, researchers from the University of Wollongong say.

The study involved more than 4,000 children. Playing a team sport at least once a week for three months during the school year meant those children were at a decreased risk of cancer, heart disease, diabetes and depression. As well, being part of the team improved self-esteem and encouraged positive interactions with others.

"Girls who participate in sports have higher social functioning than girls who do not participate," researcher Stewart Vella said in a release, but added more research is needed to look into why this is the case.

The study was published in the Journal of Pediatrics.