The shadows are lengthening across the Golden Temple, the last rays of the sun striking off its gilded exterior. Pilgrims walk slowly around the four sides of the sacred pool. The religious chanting of the Sikh clerics within, broadcast across the entire complex, keeps out the traffic's growl on an early autumn evening in the crowded city of Amritsar.

But from a small construction site in one corner of the temple complex comes the sound of drilling. Here workmen brought from distant Rajasthan are preparing spectacular marble panels inlaid with semi-precious stone for a new place of worship, or gurdwara.

This is no ordinary shrine. It is a memorial dedicated to those who died in perhaps the most controversial single event in recent Sikh history, the storming of the Golden Temple by Indian security forces in 1984 after it was occupied by Sikh militants under the command of a seminary student turned extremist, Jarnail Singh Bhindranwale. Many hundreds, possibly thousands, were killed in the assault, including Bhindranwale as well as Sikh and Hindu pilgrims caught in the crossfire, and the complex was badly damaged. The assault led to the assassination of Indira Gandhi, the then prime minister, by her Sikh bodyguards, which provoked the massacre of about 3,000 Sikhs by mobs in Delhi alone.

The Punjab, the north-western state that is the historic homeland of the Sikhs, was plunged into a violent insurgency that lasted almost a decade.

For most of the population that's all history. But for others, events that stunned the subcontinent 30 years ago continue to rouse passions. At the weekend 78-year-old Lieutenant General Kuldeep Singh Brar was targeted in an apparent murder attempt during a visit to London. In 1984 Brar led the bloody assault on the temple; he remains a hate figure for some Sikhs.

In the Punjab, meanwhile, a fierce row has erupted over the new gurdwara. It is being built by volunteers led by Baba Harnam Singh, the head of the seminary Bhindranwale once led. The dispute is reopening wounds that have barely healed, revealing tensions between Sikh communities overseas and in India, and showing how events such as the killing of six Sikhs by a lone, racist gunman in Wisconsin in August can have a political, social and cultural impact thousands of miles away.

One key question is whom the memorial is meant to honour. "The memorial is for all those killed, except [those] from the Indian state, of course. It is for the defenders, not the invaders," Harnam Singh told the Guardian, sitting in an alcove near the shrine, surrounded by seminary students in white robes and orange or blue turbans. "It is for our martyrs." For Bittu Kanwarpal, secretary general of the once-proscribed Dal Khalsa organisation and a former militant, the key aim is to teach "the next generation [about] the handful of people who sacrificed their lives and fought the might of the Indian state".

Support for some kind of memorial appears almost universal in Amritsar, but the involvement of the hardline groups and the leading role of Bhindranwale's own institution has worried many moderate Sikhs. Few in the Punjab now talk of the violence of previous decades, which often pitted brother against brother and involved widespread human rights abuses by all protagonists. It is not taught in schools or even in universities, other than as an optional element of postgraduate courses on terrorism. "We will talk about it if someone wants to. But what is the point of raking over these bad memories? There are other issues such as deep and widespread poverty," said JS Sekhon, at Amritsar's Guru Nanak Dev University.

Journalists in Amritsar say their yearly stories on the anniversary of the 1984 assault are met with dismay. "People ask why we are going back to this," one said. The result is widespread ignorance. Yards from the Golden Temple, 19-year-old Damandeep Singh, who runs a dried fruit shop, said he knew of "some kind of fight in the temple and then some bad times, but I don't know the details". The vacuum is increasingly filled by the hardliners and voices from the diaspora. The two often coincide.

Substantial funds have been donated to the new shrine from Sikhs overseas. Analysts say permission for the memorial, mooted since 2005, was granted after the local ruling party was surprised by widespread protests over the hanging of a jailed Sikh militant this year. "We were worried that we were being outflanked by the hardliners. We need to keep the core Sikh vote," said one adviser to the party.

The protests were in part a result of a revival in Sikh identity, the adviser said, influenced by diaspora Sikhs. Many Sikhs in the west feel humiliated by demands to remove traditional knives at airports or take off their turbans for official photographers, for example, and have been shocked by incidents in which Sikhs have been attacked, often mistaken for Muslims, in the last decade.

"The Wisconsin shooting was just one of many such incidents," said Kiranjot Kaur, an elected member of the Shiromani gurdwara parbandhak committee, which acts as a parliament for Sikhs and administers religious sites. "They have a big impact here [in India]. They give rise to a sense of insecurity within the community here like over there."

One response is to stage events such as Mr Singh, organised by the Amritsar-based Turban Pride Movement, which aims to encourage more Sikhs to wear traditional clothing and to increase awareness of the religion among other communities. Contestants are judged on their knowledge of their faith as well as traditional Sikh martial arts, dance and music.

Then there is a new cult status among teenagers of Bhindranwale himself. Some talk even of a Sikh Che Guevara. "He fought oppression. He helped everybody, Hindu, Sikh or Muslim," said Solvinda Singh, a 19-year-old student.

But such feelings, along with the new memorial, risk raising dormant tensions. "He was a terrorist. Why commemorate a terrorist?" said a police officer whose father was killed by Sikh militants in 1991. "Any memorial should be for all victims of the conflict. I go to the temple daily to bow before the almighty. I do not even look at [the new shrine]."

Two-thirds of the Punjab's 24.5 million inhabitants are Sikh, and nine million are Hindu. Many Hindus support a memorial, but not all. Laxmi Kanta Chawla, a politician with the Hindu nationalist Bharatiya Janata party, said buried memories should not be disturbed. "These terrorists created violence and havoc. Tens of thousands died because of them, including many Hindus," she said. The battle is unlikely to be resolved soon. A key grievance of the Sikh community in India is what they say is the failure of the government to punish those responsible for the attack on the Golden Temple, the mob violence or abuses by security forces during the insurgency.

HS Phoolka, a supreme court lawyer who has fought a long campaign to bring those accused of killing Sikhs in the 1984 massacres to justice, said the failure to "apply the law of the land equally" still fuelled resentment. "The current generation need to know what happened. If proper legal process was followed, the attitude of people in the Punjab and outside would be completely different," he said.

No one seriously suggests a return to the horrific violence of the 1980s and early 90s. Even hardliners admit that the creation of an independent Sikh state, Khalistan, is now a rallying cry rather than a genuine demand. But no one doubts the passions excited by recent history. "If people stand silent, it does not mean they have forgotten," said Kaur, a moderate politician. "One needs to resolve these issues. One needs to bring them to closure. In the Punjab that is sadly lacking."