Nikolas Cruz is accused of murdering 17 people (AP)

A scheduled court appearance by the teenager alleged to have carried out the Florida high school massacre has been cancelled at the last minute.

Nikolas Cruz, 19, was expected to make his third appearance at a Broward County criminal court on Tuesday morning charged with 17 counts of premeditated murder.

The court had been set to hear prosecutors apply for hair samples, fingerprints, DNA and photographs of Mr Cruz as they build a case against him.

But minutes before the hearing was due to start, it disappeared from the court's list without explanation. Mr Cruz's lawyer later said defence attorneys had reached a deal with prosecutors to hand over the samples.

The teenager is alleged to have shot dead 14 pupils and three staff members at Parkland's Marjory Stoneman Douglas High School on 14 February in the deadliest high school shooting in US history.

Mr Cruz's publicly appointed defender, Gordon Weekes, said the deal with prosecutors had been reached late on Monday.

"There was no reason to push back," Mr Weekes said. "It was a routine motion that the state attorney had filed. We submitted an agreed order and there was no need for a court to hear the motion."

The hearing would have been the third courtroom appearance for Mr Cruz since the shooting.

His case is due to return to court on Wednesday, when a hearing will determine whether he has sufficient assets to pay for his own defence. It is not clear if he will attend the hearing.

The massacre, carried out with a legally purchased AR-15 assault rifle, has inflamed the long-running US debate on gun rights.

The shooting has rattled long-drawn political lines on gun rights in the country, where Republican officials have long opposed efforts by firearms control advocates to tighten ownership laws, partly out of concern about retribution by the powerful National Rifle Association (NRA) lobby group.

US President Donald Trump, a Republican who backed gun rights during and since his 2016 presidential campaign, has been under pressure to show he is responding without alienating Republicans who oppose firearms restrictions.

On Monday, he met with 35 governors, urging them to disregard pressure from the NRA as they seek to address firearms safety and school security.

Mr Trump has embraced the call to safeguard schools by arming teachers but also has voiced support for strengthening background checks for prospective gun buyers - a proposal the NRA has traditionally resisted.

This live blog has now finished.