By Nidal al-Mughrabi
GAZA (Reuters) - Egypt opened the Rafah border crossing on Saturday to allow Palestinians to travel in and out of the Gaza Strip for the first time in three months, in a possible sign of easing tension between Cairo and Gaza's dominant Islamist Hamas movement.
Gaza, a small impoverished coastal enclave, is under blockade by neighboring Israel and Egypt has kept its Rafah crossing largely shut since Cairo's Islamist president was toppled by the army in 2013.
Two weeks ago, Egypt reopened Rafah for three days but only in one direction -- for Palestinians stranded outside Gaza to return home. But Saturday's move, allowing travel in both directions, might signal a cautious improvement in relations between Cairo and Hamas after two years of high tension.
Local residents said an initial bus with passengers had crossed into Egypt and a source at Cairo international airport said Palestinians were flying in to set out overland for Gaza.
Border officials said the new opening would last for three days and some Palestinian sources said it could be extended, although there was no immediate Egyptian confirmation.
Egypt has occasionally opened Rafah to allow passengers with foreign passports as well as students and hospital patients to travel. Israel, which waged war with Hamas in July and August last year, allows travel between it and Gaza largely only on humanitarian grounds such as relief aid and medical treatment.
Cairo has accused Hamas, which is close to the Muslim Brotherhood, of helping militants in Egypt's Sinai desert, which borders on Gaza, attack its security forces. Hamas denies this.
But a decision by an Egyptian court earlier this month to cancel a previous ruling labeling Hamas a terrorist group was praised by Palestinian Islamists and raised speculation that relations between Egypt and Gaza may improve.
"The opening ... for three days is a positive indicator, it comes after another good decision taken by the court. We hope Egypt opens the crossing permanently and can regain its role in Gaza and Palestine," Hamas spokesman Fawzi Barhoum told Reuters.
Gaza officials said 15,000 people had registered to travel via Rafah, including at least 3,000 patients, and hundreds of students who study in Egypt and elsewhere in the Arab world.
Ahmed Abu Taeima, 34, a Palestinian accountant who lives in Saudi Arabia, said he had waited for four months to be able to return from Gaza to the kingdom and was lucky he could get back before his Saudi residency permit expires in two weeks' time.
"I was fearing I could lose my residency and my work. Thank God the crossing has opened and I can leave," he told Reuters at the Rafah passport hall.
(Additional reporting by Yousri Mohamed in Ismailia; Writing by Nidal al-Mughrabi; Editing by Ori Lewis and Mark Heinrich)