Nasser Nasser, File, Associated Press
FILE - In this undated file photo of Alaa Abdel Fattah, 24, left and his wife Manal Hassan, 23, right in Cairo, Egypt. An Egyptian court ordered the release Sunday, Dec. 25, 2011 of a prominent blogger detained nearly two months ago by the ruling military for his alleged role in deadly sectarian clashes in October.

CAIRO — An Egyptian investigative judge ordered the release Sunday of a prominent blogger detained nearly two months ago by the ruling military, which had accused him of attacking soldiers during deadly clashes in October.

Alaa Abdel-Fattah's father, Ahmed Seif, told The Associated Press his son would remain in custody for several more hours until the paperwork has been completed. He said his son has been banned from travel abroad.

Abdel-Fattah's sister, activist Mona Seif, told the AP her brother was on his way to the Egyptian capital's security headquarters where he would be freed later in the day.

Military prosecutors detained Abdel-Fattah on Oct. 30 after he refused to answer questions about their allegations that he played a role in the clashes.

The violence on Oct. 9 began when groups of stone-throwers attacked a crowd of Coptic Christians protesting an attack on a church in southern Egypt. TV footage showed the military moving in with force, including using armored vehicles to run over the crowds.

At least 27 people, most of them Christians, were killed.

The military has accused Abdel-Fattah of inciting the Christian protesters to attack the soldiers. He was also accused of stealing a military weapon, deliberately destroying military property and attacking security forces.

He denies the allegations.

His supporters dismissed the claims, saying the military was trying to silence a prominent critic and to deflect blame on its soldiers in the violence. Abdel-Fattah wrote in newspaper articles he smuggled out of jail that his arrest was motivated in large part by his insistence on autopsies to determine the cause of the protesters' deaths.

Several of the victims were found to have been killed by being run over, according to activists.

Abdel-Fattah had maintained that the military prosecutors could not question him since the military was suspected of involvement in the killings.

Later the case was handed to the civilian judge who ordered his release. The reasons for the release were not immediately made public, but Abdel-Fattah had not been formally charged.

The blogger was a leader of the 18-day uprising that ousted Hosni Mubarak in February. His detention has elicited international condemnation and, activists say, provided more evidence that the generals who took over ruling the country from Mubarak were following the same authoritarian policies adopted by the deposed leader.

Abdel-Fattah, 30, belongs to a family of activists who used his detention to draw international attention to the plight of thousands of civilians hauled by the ruling generals before military courts. At least 12,000 Egyptians have been tried before military courts since late January.

Abdel-Fattah was Egypt's first blogger activist, launching a blog years ago organizing opposition to Mubarak. He has been a vocal critic of the generals who took over from Mubarak. He is married to Manal Hassan, who is also an activist. She gave birth to the couple's first child, a boy, while her husband remained in detention.

Abdel-Fattah's arrest in October marked a new low in relations between the activists who engineered Mubarak's ouster and the generals led by Field Marshal Hussein Tantawi, the deposed leader's defense minister for some 20 years.

Relations have since steadily worsened, hitting a new low with army troops earlier this month brutally beating and stomping on protesters, including women, in clashes that left at least 18 people killed and dozens wounded. One particular image of a woman stripped half naked by the troops and beaten and stomped on while she lay on the ground caused an uproar, unleashing a wave of criticism of the military in the independent press and a protest march by about 10,000 women.

The beatings drew a statement of strong regret by the ruling military council, but no apology. However, members of an advisory council set up by the military say the generals were now prepared to look into proposals to bring forward the date of their transfer of power to a civilian administration. According to the military's timetable, the generals would step down after presidential elections are held before the end of June, 2012.