CAIRO (Reuters) - Egypt has executed six members of a Sinai-based militant group with links to Islamic State for carrying out an attack on soldiers near Cairo last year, their lawyer said on Sunday.

The group, Sinai Province, has killed hundreds of policemen and soldiers since the army toppled Islamist President Mohamed Mursi in 2013 after mass protests against his rule.

A military court tried of members of Sinai Province, which has pledged allegiance to Islamic State, the ultra-hardline Sunni group that has seized large parts of Iraq and Syria.

Formerly known as Ansar Bayt al-Maqdis, it has carried out bombings and shootings against police and soldiers mostly in North Sinai.

The men were convicted on charges which included carrying out an attack in which two army officers were killed during a shootout in Arab Sharkas village north of Cairo.

Two of a total of nine defendants were sentenced to life in prison. Another man was sentenced to death in absentia.

“The ruling was more of a political decision than a court decision,” said defense lawyer Ahmed Hammam.

Egypt rejects allegations by critics that its judiciary is politicized.

In April, New York-based Human Rights Watch said three of the men who were facing execution could not have taken part in any attacks because authorities had arrested them three months earlier and were still holding them in detention at the time, citing comments from their relatives and lawyer.

After toppling Mursi - the country’s first freely elected president - then army chief Abdel Fattah al-Sisi launched the toughest crackdown on Islamists in Egypt’s history.

Sisi has identified the Brotherhood as a threat to national security, an allegation it denies.

On Saturday, an Egyptian court sought the death penalty for Mursi and 106 supporters of the Brotherhood in connection with a mass jail break in 2011.

While Mursi’s Muslim Brotherhood has largely been neutralized with thousands of arrests, Sinai Province remains resilient despite continuing military operations.