At least eight people have been killed in an explosion near a security compound in Egypt's Sinai region, near the border with Israel, the Interior Ministry and security officials have said. 

Medical sources said at least 22 other people were injured in the blast on Sunday.

The Interior Ministry said seven people were killed and around 25 others were injured in an explosion.

Security sources said the rocket was targeting North Sinai's main security compound but instead fell in front of a nearby crowded supermarket in Sinai's northern city of al-Arish, Reuters news agency reported. 

A few minutes later, two rockets hit a security unit in the same city killing an officer and injuring seven others, medical sources said.

The military post is located near a compound of residential buildings in the al-Salam district. The main security headquarters and the local government offices are also located in the same area.

Egypt has been hit by attacks from Sinai based fighters, who have mainly targeted security forces since last year's army ouster of elected President Mohamed Morsi. Hundreds of soldiers and police officers have been killed in those attacks.

The army ousted Morsi in July of last year after protests against his rule, and the move was followed by a crackdown in which hundreds of street protesters were killed and thousands of opposition leaders and activists were jailed.

Egypt's newly elected President Abdel Fattah el-Sisi, the former army chief who orchestrated Morsi's overthrow, has promised to combat violence and restore stability to the Arab world's most populous state.