Updated

Egypt closed its Rafah border crossing in Sinai with the Palestinian Gaza Strip on Monday after a deadly attack nearby that killed 24 policeman, a border official told AFP.

Last week, Egypt said it would close the crossing indefinitely, but it was partially reopened on Saturday, according to the Hamas-run interior ministry in Gaza.

The decision to close the crossing, which is the only way most Palestinians in Gaza can leave the territory, comes after 24 Egyptian police were killed in an attack nearby.

The police were targeted by militants who fired rocket-propelled grenades at two buses travelling from the town of Rafah on the Egyptian side of the border with Gaza, security and medical security said.

Three others were injured, the interior ministry said, blaming "armed terrorist groups" for the attack in north Sinai.

It was the deadliest attack of its kind in years, with the toll exceeding even that of an August 2012 attack on Egyptian troops in the Sinai Peninsula that killed 16 soldiers.