In a gun attack at a school in the US city of St. Louis, an attacker killed at least three people and injured several others.

The fatalities are a juvenile and an adult, Missouri City Police Chief Michael Sack said Monday.

The attacker was killed in an exchange of fire with incoming police officers.

The background to the crime and the identity of the shooter were initially unclear.

According to Sacks, the attacker was "about 20 years old".

The police were called to the high school shortly after 9:00 a.m. (local time; 3:00 p.m. CEST) on Monday morning because of the shooting.

Escaping students spoke of an attacker with a "long gun," police chief Sacks said.

The officials then heard shots and eventually encountered the attacker.

Deadly gun attacks in schools are common in the United States.

In May, an 18-year-old shot dead 19 children and two teachers at an elementary school in the small Texas town of Uvalde.

On Monday, a youth pleaded guilty to the killing of four classmates at his Michigan school last year.