Egypt's Interior Ministry made the announcement in a statement on Monday, saying the militants had been killed in a shootout in an area located between Ramadan city and Bilbeis town in the Nile Delta province of Sharqiya.
The security forces came under heavy fire as they surrounded the hideout, which forced them to "deal with the source of the shooting," the ministry said, adding that the incident led to the deaths of five unidentified militants and apprehension of six other people.
The statement noted that the militants had been training to use firearms at the site, where security forces found bomb-making materials, assault rifles and ammunition for possible terrorist attacks.
The ministry said they also arrested six other "elements" from the same group who were observing "some vital buildings in preparation to carry out a series of hostile operations against them" in Cairo and the southern province of Assiut.
The ministry did not link the militants or those arrested to any specific group.
Over the past few years, militants have been carrying out anti-government activities and fatal attacks, taking advantage of the turmoil in Egypt that erupted after the country's first democratically-elected president, Mohamed Morsi, was ousted in a military coup in July 2013.
The Daesh-affiliated Velayat Sinai terrorist group has claimed responsibility for most of the assaults. The group later expanded its attacks to target members of Egypt’s Coptic Christian community as well as foreigners visiting the country. That has prompted the government to impose a state of emergency and widen a controversial crackdown that critics say has mostly targeted dissidents.
Egypt saw its deadliest attack in the country's recent history last month, when militants claimed the lives of more than 300 people at a North Sinai mosque. No group has so far claimed responsibility for the attack, which had the hallmarks of the Velayat Sinai terrorist outfit.