Police were called out to Halifax Minster following reports that two men were armed with a gun in the church grounds.
When officers arrived at 1.59pm on Sunday they discovered that the firearm was an air rifle.
As police could not prove the weapon had been fired and there was no damage caused, the men were let off with a warning.
Sergeant Howard Ainley said: “Both males were stopped and searched.
“It could not be established if the firearm had actually been fired and no damage had been caused.
“To deal with the matter effectively the decision was made to seize the weapon, to prevent any further problems.
“The owner signed a disclaimer to allow the police to discard the weapon to prevent it falling into the wrong hands.
“Both males were warned regarding their behaviour.”