Rev Keith Brindle from St James' in Devizes said on Saturday the church held a 24 hour prayer vigil for knife crime in the community.
However, the vigil initially wasn't supposed to happen in the building.
"We weren't supposed to be in the church. We were going to have the knife amnesty in a building 100 metres away, and if it would have been in that building, we wouldn't have spotted the thieves," he told Premier.
The vicar added that a church member named Kirsty, who turned up 30 minutes early for her 3am prayer slot, is the one that noticed a loud noise was coming from the church.
Rev Brindle passed it off as a group practising firing guns at the Salisbury Plain Training Area, which sometimes happens in the middle of the night. But Kirsty kept saying the noise sounded much closer.
"We were praying and walking around the church, and we saw feet upon the flat roof through one of the stained glass windows and she turned me and said 'that isn't guns...somebody is nicking the lead of our church'."
Rev Brindle then snuck into another corner of the church and called 999. The two men were caught in the act and arrested on the roof.
"If Kirsty hadn't got here half an hour earlier, they would have been gone.
"That was first overnight prayer vigil we've had in the three and a half years I've been priest here. If they would have chosen any other the day, they would have got away with it.
"But all those good coincidences come together when God's people pray together."
Rev Brindle said it caused damage and hassle to the church, but he's glad it prevented more hassle and damage to other churches.
"It's actually nothing compared to the thing we were praying about, knife crime," he added.
The prayer vigil concluded a 2 week knife-crime initiative St James' Church had with Wiltshire Police, which included the church creating a space for people to deposit knives safely and securely.
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.