Egyptian authorities have closed the Rafah border crossing with the Gaza Strip "indefinitely" for security reasons after a day of deadly violence nationwide," a security official told AFP on Thursday.

Hundreds of Palestinian travellers were left stranded on both sides of the crossing, the only gateway into the Hamas-ruled Palestinian territory that bypasses Israel, witnesses said.

The measure follows widespread unrest in Egypt on Wednesday after a bloody crackdown by security forces on loyalists of ousted Islamist president Mohamed Morsi.