At least two young children have been killed and scores injured after a 52-year-old woman crashed her Toyota Kluger into a primary school in southwest Sydney.

Two eight-year-old boys were rushed to a hospital in critical condition but died from cardiac arrest after the sports utility vehicle smashed through the wooden wall of Banksia Road Primary School, police confirmed. Three other pupils, all girls aged eight and nine, were also brought to the hospital with injuries. They remain in serious or stable condition.

Another 16 children and their teacher were treated on the spot for minor injuries. Police said there were 24 primary-age children in the class when the collision happened on Tuesday morning.

A closer look at the classroom- Greenacre @7NewsSydneypic.twitter.com/Hdh0O3w9aA — Peter Fegan (@PeterFegan7) November 7, 2017

Footage from the scene showed the Toyota completely inside the classroom after it smashed through its wooden wall.

Panicked parents on the scene in Greenacre @7NewsSydneypic.twitter.com/piJNQdMf2c — Peter Fegan (@PeterFegan7) November 6, 2017

“Obviously, it was a scene of carnage,” New South Wales Ambulance Superintendent Stephanie Radnidge told reporters outside the school.

Authorities have detained the driver, who was uninjured in the crash, and have taken her to the hospital to conduct blood and urine tests. The driver allegedly lost control of the vehicle while either exiting the school grounds or trying to park the Toyota.

#Greenacre: Vehicle involved in this morning’s school crash has now been removed for Police testing #7Newspic.twitter.com/cL4AFuvG3u — Paul Walker (@pdwnews) November 7, 2017

“We have a 52-year-old local woman who is with police at this time. She’s cooperating with blood and urine testing and the processes that accompany that investigation,” Acting Assistant Commissioner Stuart Smith told reporters. “We’re not looking this as an intentional act. It is a crash investigation.”