AYODHYA, India — A suicide bomber blew up a security fence Tuesday and gunmen used the breach to storm a Hindu shrine complex at the center of Hindu-Muslim strife, setting off a two-hour gunbattle that left all six attackers dead, police said.

An attacker in a jeep blew himself up, with the blast tearing a hole in iron railings surrounding the shrine and allowing the other five attackers to get within 50 yards of the temple’s inner sanctum, police said.

After the gunbattle, the attackers’ bodies were sprawled on the grounds, and hundreds of local residents converged on the complex. Three security guards were wounded in the battle, and police said they recovered four AK-47 assault rifles, one carbine rifle, 17 live grenades and one small rocket launcher from the attackers.

The site, about 350 miles east of New Delhi, is claimed by both Hindus and Muslims, and the attack appeared religiously motivated, although no claim of responsibility was made and police didn’t blame any group.

Hindu nationalists quickly pointed a finger at Pakistan-backed Muslim militants from the Indian-controlled portion of Kashmir, and said the incident proved India’s recent peace overtures with Islamabad were a failure.

Pakistan condemned the attack, as did the largest militant group in Kashmir, Hezb-ul Mujahedeen. India and Pakistan are pursuing peace after years of acrimony.

1992 attack sparked riotsThe sprawling 80-acre complex has seen previous violence. In 1992, Hindu nationalists demolished a 16th century Muslim mosque on the site, sparking riots that killed more than 2,000 people.

Hindu leaders claim the mosque was built by Mogul rulers on the site of a sacred Hindu temple. They believe it is the birthplace of Ram, the highest god in the Hindu pantheon, but Muslims say there is no proof of that claim. The dispute is still working its way through India’s courts.

Ayodhya is guarded at all times by thousands of troops, and the site has multiple barricades where visitors are frisked. Security is so tight that even pens, pencils, lighters and matchboxes are prohibited.

Security officials in New Delhi said they were able to repulse the attack relatively quickly because intelligence reports had indicated that militant groups were planning to attack religious sites.

Prime Minister Manmohan Singh strongly condemned the attack and said the government would deal firmly with terrorists.

“All state governments have been alerted to take adequate precautions to protect monuments, security installations, religious places. Particular attention has been drawn toward maintaining communal harmony, peace and public order,” said Singh’s spokesman, Sanjay Baru.

The attack triggered a quick reaction in Hyderabad, about 680 miles south of New Delhi. Police arrested 20 Hindu nationalists protesting what they said was Pakistan’s involvement. They burned the Pakistani national flag and a paper effigy of Pakistan President Gen. Pervez Musharraf, police said.

The opposition Bharatiya Janata Party called for additional demonstrations.

The violence was the first major attack on a Hindu temple site since a 2002 assault on the Akshardham temple in western Gujarat state which left 32 people dead. That attack was blamed on the Pakistan-based Lashkar-e Tayyaba group — one of more than a dozen guerrilla groups fighting for Kashmir’s independence or its merger with mostly Muslim Pakistan.