Media playback is unsupported on your device Media caption Students were evacuated from their classrooms

A man walked into a US primary school and fatally shot his wife in her class, also killing a child in the crossfire, before turning the gun on himself.

Armed with a .357 Magnum revolver, Cedric Anderson, 53, entered the school in San Bernardino, California, as a visitor before Monday's attack.

He killed estranged wife, Karen Elaine Smith, 53, a teacher, and fatally wounded Jonathan Martinez, eight.

Police described the incident as a "murder-suicide".

The shooting happened at 10:30 local time (17:30 GMT) at North Park Elementary School, 60 miles (96km) east of Los Angeles.

Image copyright San Bernadino Police Image caption Mr Anderson (R) killed his estranged wife Ms Smith (L) and an eight-year-old boy

The gunman kept his weapon concealed as he entered the school before opening fire in the classroom where 15 children with special needs were being taught, authorities said.

"He simply said he was there to drop something off there with his wife," San Bernardino Police Chief Jarrod Burguan told a news conference.

The couple married in January this year but had been separated for several weeks, Mr Burguan added.

Another student who was caught in the crossfire, a nine-year-old, was in hospital in a stable condition, the Los Angeles Times reported.

San Bernardino Police Lt Mike Madden said: "This does appear to have been a murder-suicide with both male adult and female adult victim succumbing to injuries, with the male succumbing to a self-inflicted gunshot wound."

The school, which has around 500 students, was immediately evacuated.

Image copyright AFP/Getty Images Image caption Relatives arrive to collect children after they were transferred to Cajon High School

They were transferred by bus to nearby Cajon High School, where they were reunited with their parents.

In December 2015, 14 people were killed and 21 others wounded when a couple entered a disabled service centre in San Bernardino and began firing at a group of county health workers.