Cairo: Egypt detained a senior Hamas official at Cairo International Airport, security sources said on Tuesday, a day after it reopened the Rafah border post to allow Palestinians to travel in and out of the Gaza Strip.

Hassan Al Saifi, the deputy religious affairs minister in Hamas-ruled Gaza, was stopped on his way back from Saudi Arabia to the Palestinian enclave after Cairo airport security found “issues in the security approval for his entrance to the country,” an airport security source said.

Al Saifi will remain in detention until issues with his paperwork are resolved, he said.

A second security source said Al Saifi was detained at dawn on Monday. Hamas could not be reached for comment.

Egypt opened the Rafah border post on Monday until August 20 to allow Palestinians to travel in and out of Gaza, a small impoverished coastal enclave that is under blockade by neighbouring Israel.

Cairo has kept the Rafah border post largely shut since Egypt’s Islamist president was toppled by the army in 2013, but has occasionally opened it for short periods at a time.

Hamas has long had ties to the Egyptian Muslim Brotherhood that was ousted from power when former president Mohammad Mursi was overthrown in 2013 after mass protests against his rule.

The Egyptian government has accused Hamas of helping Islamist militants in Egypt’s Sinai desert, which borders on Gaza, attack its security forces. Hamas denies this.

However a decision by an Egyptian court in June to cancel a previous ruling labelling Hamas a terrorist group raised speculation that relations between Egypt and Hamas may improve.