NEW DELHI/AHMEDABAD, 5 April — Prime Minister Atal Behari Vajpayee yesterday expressed shame and chastised his Hindu nationalist allies ruling riot-torn Gujarat state as he visited for the first time thousands of Muslims made homeless by the violence.

A visibly angry Vajpayee delivered his most direct rebuke to the state’s chief minister, Narendra Modi, a member of his BJP party who riot victims accuse of turning a blind eye to the bloodbath.

"This insanity cannot be allowed to continue," he said of the savagery that has killed more than 800 people, most of them Muslims, since late February. "The poison of religious violence must be stopped."

"Government servants must understand their responsibility and work for the people. Politicians must understand their responsibility to work for the people," Vajpayee, with Modi at his side, said at a camp housing 10,000 displaced Muslims.

"I am talking to officials and to politicians. I have come to tell you that you are not alone. The whole country is with you."

The government of Gujarat has been accused of giving less compensation to Muslim victims than Hindus and failing to ensure the safety of those who have lost their homes.

More than 100,000 people have been languishing in relief camps, where many lack adequate food or sanitation and are still subjected to harassment, according to Amnesty International.

The refugees at Shah Alam camp mostly sat silently as they listened to Vajpayee, with security personnel removing some who had tried to chant slogans against Modi.

Vajpayee never mentioned Modi by name but seemed to reply to accusations BJP and other right-wing Hindu leaders had incited the violence.

"There should be no speeches which will break people’s hearts," he said. "We have to live together."

The frail premier earlier visited Godhra where he climbed into a train compartment that was torched by a crowd on Feb. 27, an attack which killed 58 Hindus and set off India’s worst communal violence in a decade.

The victims had been travelling back from Ayodhya, where Hindu hard-liners — many affiliated with Vajpayee’s BJP — are campaigning to build a temple over a razed mosque.

"What happened there (Godhra) should be condemned, but events after that should also be condemned. They are more shameful," Vajpayee told the refugees. "The aim of our government is to protect everybody’s right to life and property and honor. There should be no discrimination. That is what our religion and culture teaches us."

Vajpayee, surrounded by heavy security, was in Gujarat for a one-day visit — his first since the violence erupted. He said he wanted to take personal stock of events that have left more than 100,000 people in relief camps across the state.

Despite his strong condemnation of the violence and assurances the country was behind the victims, some were doubtful that the pledges in his 15-minute speech would be upheld. "It was good to hear finally someone from the government," one survivor at the Shah Alam Camp said. "But I don’t know how much of what he said will really be transformed into action."

As Vajpayee spoke, outside the camp, thousands of Muslim protesters roared demands for the dismissal of Chief Minister Modi.

Vajpayee has been under pressure from opposition parties to fire Modi but he has been under equally strong pressure to back Modi from hard-line party members who believe he has restored the BJP’s fortunes in the state, known for its religious divisions.

Vajpayee’s trip was marked by continued sporadic violence in cities and rural areas.

Hours before his arrival, two Muslims were killed by Hindu attackers, bringing to 10 the number who died in the 24-hour period before his visit. The victims included a Muslim family of five who were burnt to death.

One person died yesterday in police firing in the northern town of Modasa at about the time Vajpayee was addressing the refugees.

Police were trying to control clashes which left seven people injured, including four stabbings.

"I cannot imagine how someone can be burnt to death. We burn our dead after their lives end," Vajpayee said, referring to the Hindu practice of cremation. "But to burn living men, women and children? How can one do that? Are we human or not?"

Vajpayee acknowledged the damage done to India’s international reputation. "I don’t know with what face I will go abroad after all of what happened here," he said. "Becoming a refugee in one’s own country pierces the heart."