Former US president Donald Trump has rejected calls for tightened gun controls following the Texas school massacre, saying decent Americans should be allowed the firearms they need to defend themselves against "evil".

"The existence of evil in our world is not a reason to disarm law-abiding citizens... The existence of evil is one of the very best reasons to arm law-abiding citizens," he told members of the National Rifle Association.

Mr Trump's remarks came as he headlined an NRA event in Houston, three days after a gun massacre at a Texas elementary school reignited the tinderbox debate about US gun control.

"The various gun control policies being pushed by the left would have done nothing to prevent the horror that took place. Absolutely nothing," he said.

An 18-year-old gunman with a legally-bought AR-15-style rifle killed 19 children and two adults at Robb Elementary School in Uvalde, Texas, on Tuesday, marking the deadliest school shooting in the state's history.

Mr Trump read out the names of all 19 children, whom he described as victims of an out-of-control "lunatic," before suggesting that efforts at gun control were "grotesque".

"All of us must unite, Republican and Democrat - in every state, and at every level of government - to finally harden our schools and protect our children... What we need now is a top-to-bottom security overhaul at schools across this country," he added.

The former president also said: "Clearly, we need to make it far easier to confine the violent and mentally deranged into mental institutions."

Mr Trump suggested that every school should have a single point of entry, strong fencing and metal detectors.

There should be a police official or an armed guard at all times in every school, he added.

"This is not a matter of money. This is a matter of will. If the United States has $40 billion to send to Ukraine, we can do this," he said, referring to Washington's financial and military support for Ukraine after Russia's invasion in February.

Video images of the main auditorium in Houston, which holds about 3,600 people, showed it to be about half-full as Mr Trump took to the stage.

Around 500 people protested outside the NRA's convention in Houston calling for tighter gun controls.

Multiple speakers, including Texas Governor Greg Abbott, pulled out of the event after the murders but Mr Trump confirmed on Wednesday he would not be cancelling his appearance at the NRA's annual "Leadership Forum".

President Joe Biden, who upbraided the US gun lobby in the wake of the shootings, is due in Uvalde tomorrow with first lady Jill Biden to "grieve with the community," White House officials said.

The NRA is considered the most powerful gun rights organisation in the country, although its influence has waned as it has become mired in legal battles linked to a corruption scandal.

It has rejected most initiatives to prevent mass shootings, including expanded background checks on gun purchases, although it said ahead of Mr Trump's speech that audience members would not be allowed to carry firearms.

Republicans in Washington have suggested "hardening" schools with beefed up security - including armed guards posted at a single entry and exit point - rather than restrictions on gun ownership.

They have also spoken of the need to focus on mental health, although critics point out that other nations with stricter gun controls face the same issues and don't see regular mass shootings.

There have been 214 mass shootings this year in the United States, according to the Gun Violence Archive.

They include a racist massacre at a supermarket in a black neighbourhood of Buffalo, New York, just ten days before the Texas killings.

Read more:
Police acknowledge 'wrong decision' in Texas shooting response
Lockdown drills 'part of life' for Irish teacher in US
Videos show parents urging police to intervene sooner during Texas shooting