Madhu is considered sacred by Catholics, who make up about six percent of the island's population, and who make regular pilgrimages to worship a statue of the Virgin Mary there.
But priests at the shrine removed the statue earlier this month after shelling between the army and the Tigers erupted closer to the church. It was taken further north into areas controlled by the Tigers.
A large number of refugees who had sought shelter in the church compound also left.
The military had avoided any direct confrontation with the Tigers during the mission to secure the area in order to minimize harm to civilians and avoid damage to the church.
"The soldiers of the 8th battalion of the Sri Lanka Light Infantry regiment reached the shrine as the terrorists beat a retreat unable to withstand the army advance," the defence ministry