Egypt briefly reopened the Rafah crossing on Saturday for humanitarian reasons to allow in some 50 people who were stranded in the Gaza Strip, the Hamas interior ministry said.

Egypt had on Thursday announced it was closing "indefinitely" the only crossing -- the only route into the Hamas-ruled coastal enclave that bypasses Israel -- for security reasons a day after deadly violence nationwide.

The move had left hundreds of Palestinians stranded on both sides of the border, witnesses said.

On Saturday Egypt "reopened the Rafah crossing to allow through international travellers" who hold foreign passports and "humanitarian cases," the interior ministry said.

It was referring to people in need of medical treatment in Egyptian hospitals.

Hamas is allied with the Muslim Brotherhood of deposed Egyptian president Mohamed Morsi.

On Wednesday nearly 600 people, most of them Morsi supporters, died in a crackdown by Egyptian security forces on two protest camps in Cairo.

Hamas denounced the crackdown but on Saturday spokesman Sami Abu Zuhri said in a statement that the Islamist Palestinian movement "has not and will not be a party in Egypt's internal affairs".

Hamas, he added, would also not accept "interference" by any Gaza-based group in Egypt.

...,/.,