Turkey declared Sunday one day of mourning nationwide after the Egypt mosque attack that killed over 300 worshippers and injured 128 others in Sinai peninsula.

The government has ordered flags at half-staff at the state buildings inside and outside the country.

The gun and bomb assault on the Rawda village mosque in restive North Sinai roughly 40 kilometres (25 miles) west of the provincial capital of El-Arish killed 305 people including 27 children during the weekly Friday prayers.

Authorities said up to 30 militants in camouflage flying the black banner of Daesh surrounded the mosque and massacred worshippers.

The Sinai Peninsula has remained the epicenter of a militant insurgency since mid-2013, when the army ousted and imprisoned Mohamed Morsi, Egypt's first freely-elected president, in a military coup. Hundreds of security forces and civilians have been killed in the insurgency, which has been largely confined to the desert region.

Many Turkish officials, including President Recep Tayyip Erdoğan and Prime Minister Binali Yıldırım, condemned the terror attack and offered their condolences to the Egyptian nation.

Turkey's political relations with Egypt have remained rocky since Morsi was ousted. However, recent years have seen signs of readiness from both sides to normalize relations on the condition of reciprocity.