JAKARTA (Reuters) - A Jakarta court has sentenced a female would-be suicide bomber to seven and a half years in prison, prosecutors and her lawyer said, the first time a woman has been convicted in Indonesia for planning such an attack.

Slideshow ( 2 images )

Dian Yulia Novi, 28, was arrested late last year on suspicion of plotting to blow herself up outside Jakarta’s presidential palace during the changing of the guard. She was arrested along with her husband, Muhamad Nur Solikin.

Indonesia, the world’s largest Muslim-majority nation, has seen a surge in homegrown militancy inspired by Islamic State, and has grappled with a series of small-scale attacks in the past two years.

Prosecutors had demanded a 10-year sentence for Novi, whom they said received instructions to carry out the attack from Bahrun Naim, an Indonesian militant believed to be fighting with Islamic State in Syria.

“Her sentence was reduced because she admitted to her actions,” Novi’s lawyer Kamsi told Reuters on Monday. He said the verdict was handed down by East Jakarta District Court on Aug. 25.

Judges delivered the verdict earlier than expected because Novi is pregnant and due to give birth in early September, her lawyer said. She is detained at a Jakarta area facility.

Her husband is on trial for the same plot. His next hearing, at which he is expected to enter a plea, is scheduled for Sept. 6.

Kamsi said Novi, who was believed to be radicalized through social media while employed as a domestic worker in Taiwan, did not intend to appeal her verdict.

Police said they had intercepted a letter that Novi intended to send to her parents stating her intention to carry out jihad. Later an unexploded bomb was found in a room the woman had rented in Bekasi, about an hour outside Jakarta.

Counter-terrorism forces are worried that militants may be using new and more sophisticated tactics to try and carry out attacks - like recruiting female suicide bombers or using dangerous chemicals to make “dirty bombs”.