A bombing at a famous Muslim shrine in northern India on Thursday killed at least two people and wounded 17 others ahead of one of the holiest days on the Muslim calendar, police said.

The blast at the shrine of Khwaja Moinuddin Chishti, a 12th century Sufi Muslim saint, took place just after dusk as hundreds of men and women broke the daily fasts they observe during the holy month of Ramadan.

The explosion appeared to have been caused by a small bomb packed inside a lunch box, said S. Sengthir, police superintendent in Ajmer, where the shrine is located.

Ajmer's top official, Naveen Mahajan, said at least two people had been killed and 17 wounded.

The blast took place shortly after 6 p.m., around the time for evening prayers, and the sprawling white-marble shrine was packed with hundreds of worshippers.

It also ahead of Eid al-Fitr, which marks the end of Ramadan. The holiday is to be celebrated on Saturday or Sunday, depending on when the new moon is spotted.

Markets in the town quickly closed after the blasts.

Chishti, the saint, is known as the benefactor of the poor, and his shrine, like many Sufi monuments in India, attracts people of all faiths.

The blasts immediately drew comparisons to the bombing in May of a mosque in the southern city of Hyderabad that killed 11. Officials said that attack, along with a handful of others that have killed more than 300 people in India in the past two years, was the work of Islamic extremists seeking to undermine relations between Hindu and Muslim communities.

Ajmer is predominantly Muslim but is surrounded by Hindu areas.

Relations between Hindus, who make up more than 80% of India's population, and Muslims, who account for about 130 million of India's 1.1 billion people, have been relatively peaceful since the bloody partition of the subcontinent into India and Muslim Pakistan at independence from Britain in 1947. But there has been sporadic violence.