The condition of 11 people was critical and they have been taken to Mysuru for treatment, they said.
Two people from the temple management have been detained for questioning, said police sources.
"We have collected the samples and sent it to a laboratory for investigation," he told reporters.
According to police, the foundation laying ceremony of Maramma temple was organised Friday morning and prasad was distributed after the function.
Most of those who attended the event followed the 'Om Shakti' tradition.
After consuming the prasad, people started vomiting and began writhing with stomach pain, police said.
Commotion prevailed as people hurried to nearby hospitals for treatment.
Police rushed to the spot, as also district authorities, to provide medical aid.
The affected people said they got the smell of kerosene oil in the prasad, but ignored it.