Media playback is unsupported on your device Media caption "Both phones are engineered to make it virtually impossible to unlock without the password," Mr Barr said.

US Attorney General William Barr has asked Apple to unlock two phones of a Saudi man who carried out a mass shooting at a US base.

He accused the company of not having "given us any substantive assistance", a claim that Apple denies.

The tech firm has clashed previously with the FBI over requests to unlock iPhones belonging to terror suspects.

Three sailors were killed and eight wounded in the 6 December attack by a 21-year old Saudi Air Force lieutenant.

Mr Barr described the shooting at Naval Air Station Pensacola as an "act of terrorism".

"It is very important for us to know with whom and about what the shooter was communicating before he died," he said at a press conference on Monday.

Image copyright Getty Images Image caption The bodies of the sailors were transferred to Dover Air Force Base in Delaware

Apple had given the FBI iCloud data from the attacker's online account, the New York Times reported, but refused to unlock the phone, saying it would undermine their own encryption software.

In a statement following Mr Barr's accusation, Apple rejected that it had not provided assistance with the investigation and said it had responded promptly to multiple FBI requests for information.

A similar clash in 2016 was resolved when the FBI found a way to unlock a phone belonging to a mass shooter in California without help from Apple.

Fellow Saudi cadets expelled

Also on Monday, 21 members of the Saudi military were expelled from the US.

Mr Barr said the cadets were found to have had jihadist material and indecent images of children in their possession but are not accused of aiding the shooter.

The attorney general said 17 of the expelled cadets were found to have possessed online terrorist material. Fifteen, including some of the 17 who possessed online terrorist material, had indecent images of children, he added.

He said the 21 cadets were being disenrolled and returned home on Monday.

Mr Barr added that the expelled cadets had not been charged with any crime in the US, but might face prosecution back home.

There are more than 850 Saudi military cadets conducting training in the US. Their training was put on hold after the December attack.

Image copyright EPA Image caption The attack last month occurred at the Naval Air Station Pensacola, Florida

The Pensacola base has long offered aviation training to foreign military forces. Saudi pilots started training there in 1995, alongside other personnel from Italy, Singapore and Germany.

After last month's attack, the base's commanding officer said that about 200 international students were enrolled in programmes there. According to its website, the base employs more than 16,000 military and 7,400 civilian personnel.