CAIRO, Nov. 25 (Xinhua) -- The death toll in a terrorist attack on a mosque on Friday in Egypt's North Sinai has risen to 305 killed, including 27 children, and 128 others were wounded, state news agency MENA reported on Saturday.

"The attackers of the mosque were carrying Islamic State (IS) flag," MENA quoted the statement of the country's general prosecutor as saying.

"Some 25-30 militants have gunned down the worshippers while performing the Friday prayer," it added.

The attack took place after the mosque's preacher started his speech, when the terrorists threw bombs from the windows and doors of the mosque, besieging the worshippers inside, the statement said.

Later, some masked men, carrying black flags reading "There is no God but Allah and Mohammed is his prophet," broke into the mosque with automatic weapons, it added.

Long queues of the victims' relatives were laid on the ground, some covered with blankets, outside the Suez Canal Hospital in Ismailia.

"My 23-years old nephew, Amir, who was working as a nurse has passed away in the attack," said Samy Mahmoud, who came from Delta Monofiya province to get the license of burying Amir.

The father of Amir, Magdy, a 45-year-old teacher has also been wounded in the attack by three bullets, two in his leg and one in his right arm, Mahmoud told Xinhua while waiting outside the hospital.

"I couldn't get the body of Amir and he was buried in collective graves with the others," he said while weeping.

But Mahmoud was waiting to ensure the status of the father who underwent some surgeries.

Magdy said the terrorists for the first time attacked mosque because they failed to cause rift between the Copt and Muslims and also found difficulties in targeting more security men.

North Sinai province, a mostly desert area bordering Israel and the Palestinian Gaza Strip, has been experiencing waves of anti-security attacks that killed hundreds of police and army men since the army-led ouster of Islamist president Mohamed Morsi in 2013 in response to mass protests against his rule.

Now they started to target the Muslim worshipers at mosque for the first time, which is an unprecedented development in terrorist tactics in the country, according to security experts.