Updated

A pair of bombs rigged to bicycles ripped through the crowded streets of a western Indian city Friday as Muslim worshippers were leaving afternoon prayers, killing 31 people and injuring 100, a top official said, calling the violence "a terrorist act".

Authorities quickly clamped a curfew over the city of Malegaon, where the blasts occurred, which has a long history of violence between Muslims and Hindus.

While it was unclear who was behind the attacks, officials reacted quickly, trying to stop revenge attacks across the country's often-sensitive religious divides that have, in the past, lead to spiraling violence.

"Law and order is under control," P.S. Pasricha, Maharashtra state's director-general of police, told The Associated Press. "There's a high alert across the state. We have activated all police machinery to ensure that communal harmony is maintained." Malegaon, a city of about 500,000 that is 75 percent Muslim, is in Maharashtra.

Officials said the bombings were clearly done to terrorize the city.

"It is a terrorist act. It is done by people who don't want peace," Maharashtra Chief Minister Vilasrao Deshmukh, who announced the new death toll, said at a press conference in Mumbai, the state capital. Of the 100 people injured, he said, 56 were seriously hurt.

Both bombs were rigged to bicycles, he said.

"We found packets with the explosives attached to these bicycles," he said.

CountryWatch: India

Speaking earlier, Pasricha told reporters that "the motive appears to be to create panic and make Hindus and Muslims fight with each other." He also spoke in Mumbai.

India has suffered through a series of terror bombings over the past year, most recently a carefully planned series of attacks on Mumbai's commuter trains in July that left more than 200 people dead. Those bombings were blamed on Pakistan-based Muslim militants.

Earlier this week, Prime Minister Manmohan Singh warned that India may be facing even bloodier attacks.

"Reports also suggest that terrorist modules and 'sleeper cells' exist in some of our urban areas, all of which highlight the seriousness of the threat," Singh told India's state chief ministers during a conference on internal security.

"The situation is tense," said Nashik Superintendent of Police Rajvardhan, who uses only one name. Nashik is about 100 kilometers (60 miles) from Malegaon.

The explosions came as Muslims celebrated the festival of Shabe Barat, or the Night of Fortune, when they hold night-long prayers seeking divine blessings, exchange sweets with neighbors and relatives, and set off fireworks.

Malegaon has been the scene of religious violence in the past, with riots between Hindus and Muslims occurring most recently in 2001, when 15 people were killed — but stretching back to 1962.

India's bloodiest religious violence in recent years came in 2002, in the western state of Gujarat, set off by a train fire that killed 60 Hindus returning from a religious pilgrimage.

Muslims were blamed for the fire, and more than 1,000 people, most of them Muslim, were killed by Hindu mobs. India is about 80 percent Hindu.

Human rights groups have accused the state government, led by the Hindu-nationalist Bharatiya Janata Party — the party which then also controlled the national government — of doing little to stop the violence.

The Bharatiya Janata Party lost power in the national Parliament in 2004.

Click here to visit FOXNews.com's Asia Center.