Gardaí (Irish police) and firefighters were called to a Dublin church after a man reportedly sprayed a substance in the building and on himself.
The incident happened at about 17:45 local time at St Agnes Church in Crumlin on Wednesday.
Trained Garda negotiators were involved in the operation and a spokesman said that "after a period of time" they were able to make contact with the man.
He was arrested and has been detained. No-one was injured.
The Dublin Fire Service said two fire engines, 11 firefighters and two paramedics also attended the scene.
Investigations are continuing.