Indonesia, the world's largest Muslim-populated country, is also home to significant numbers of Christians, Hindus and Buddhists but there are concerns over rising intolerance.
"There is a strong and concerning indication that he was exposed to radicalism. He ended up launching the attack here", national Police Chief Tito Karnavian revealed. The police are now investigating the motives of the assailant, who is believed to be a university student.
Authorities estimate there are hundreds of sympathisers of the group Islamic State in the country.
Police later told AFP that the suspect had wanted to join IS in its war for territory in Syria.
Palestinians return weapons stolen from IDF soldiers ambushed in Jenin
A large crowd of journalists had shown up to cover the trial of Tamimi, whose case has gained worldwide attention. Gaby Lasky , Aheds lawyer, said Palestinians will be getting another message.
His group is believed to be responsible for several terror plots in Indonesia, including a January 2016 attack in Jakarta that left eight people dead, including four militants.
There have since been a number of small-scale Islamic State-inspired incidents, including a thwarted suicide attack on the presidential palace previous year. In November that year, a small girl was killed in a Molotov cocktail attack at a church in Kalimantan that injured three other children.
The attacker also slashed the statues of Jesus and the Virgin Mary during the violence at the Santa Lidwina church in Yogyakarta, Central Java.
The assault occurred during the Sunday's mass in St Lidwina Bedhog Trihanggo church of Sleman district in the province, said the police officer who is in charge of the police station in Gamping sub-district where the incident took place. The officer then shot him below his stomach, but he managed to injure the cop before being subdued, ' said Andhi Cahyo, a congregation member. Local authorities said they had not yet interviewed the man in custody to determine a motive for the incident.