He was tied inside the temple and beaten up the whole night, Ayush alleged, adding that all five accused belong to upper castes.