Nineteen students and two teachers were shot dead when an 18-year-old gunman opened fire at their Texas elementary school, the latest in the United States' cycle of school mass shootings.

Here are the deadliest classroom gun massacres in the US in the last two decades.

1999 - Columbine High School

Two teenagers from Columbine, Colorado, armed with an assortment of weapons and homemade bombs, went on a rampage at their local high school.

Twelve students and a teacher were killed during the 20 April massacre. Another 24 people were wounded.

Columbine, whose name has become synonymous with school shootings, is one of the first - and still among the deadliest - such shootings in the United States.

2007 - Virginia Tech

A student at the Virginia Polytechnic Institute opened fire on the Blacksburg, Virginia, campus, killing 32 students and professors before taking his own life.

Thirty-three people were wounded.

The gunman had apparently idolised the Columbine shooters, referring to them as "martyrs" in a video, part of a hate-filled manifesto he mailed to police during the shooting.

2012 - Sandy Hook Elementary School

A 20-year-old man killed his mother in Newtown, Connecticut, on 14 December before shooting his way into Sandy Hook Elementary School.

Twenty children, aged six and seven, were shot dead, as well as six adults. The shooter then took his own life.

The parents of Sandy Hook victims have led numerous campaigns to toughen gun control laws, but their efforts have largely failed.

Some conspiracy theorists insist the massacre was a government hoax, claiming the shooting involved "actors" in a plot to discredit the gun lobby.

2018 - Marjory Stoneman Douglas High School

On 14 February, a 19-year-old former student at Marjory Stoneman Douglas High School who was expelled for disciplinary reasons returned to the Parkland, Florida, school and opened fire.

He killed 14 students and three adult staff.

Stoneman Douglas students have become crusaders against gun violence under the banner "March for Our Lives," lobbying for tougher gun control laws and organising protests and rallies.

Their campaign has taken off on social media, mobilising hundreds of thousands of young Americans.

2018 - Santa Fe High School

Ten people, including eight students, were killed when a 17-year-old student armed with a shotgun and a revolver opened fire on his classmates in rural Santa Fe, Texas.

Classes had just started on the morning of 18 May when the shooting began.

Following the tragedy, Texas Governor Greg Abbott unveiled 40 recommendations, mainly focused on increasing armed security on school campuses and stepping up mental health screenings to identify troubled children.

Gun ownership can be a point of pride for many Texans, and even some Santa Fe High School students spoke out against linking the shooting to the need for better gun control.