Militant Sikhs denounced as a "sellout" today an agreement between Indian Prime Minister Rajiv Gandhi and mainstream Sikh political leaders to end three years of violence in the strategic state of Punjab.

The agreement, reached yesterday, has received almost universal approval from members of the opposition parties and Gandhi's ruling Congress (I) Party.

The agreement would make the Punjab more of a Sikh state and could lead to more autonomy for Sikhs who live there.

But in Amritsar, the heartland of the Sikh religion, the militant wing of the main Sikh political party and a faction of the extremist All-India Sikh Students' Federation rejected the agreement, apparently on the ground that it does not go far enough in addressing Sikh demands for greater autonomy.

There has been no reported reaction so far from the most militant Sikhs, who are calling for an independent state to be carved out of the Punjab.

The Sikhs embrace a faith that combines elements of Hinduism and Islam and make up 2 percent of the population in this overwhelmingly Hindu country of 750 million. Three years of agitation by Sikh extremists has left at least 2,000 dead in the Punjab.

The militant Sikhs called Sant Harchand Singh Longowal, the leader of the mainstream faction of the Sikh political party who signed the agreement with Gandhi, a "traitor" and said he did not represent the Sikh masses, United News of India reported from Amritsar.

Supporters of the two rival Sikh groups shouted slogans at each other at the entrance to the Golden Temple at Amritsar today, according to the Indian news agency. No violence was reported.

The mainstream faction is scheduled to meet Friday in the Punjab. As an indication of the Gandhi government's confidence that the agreement will be ratified overwhelmingly by that group, a ban on foreigners traveling to the Punjab was lifted for the first time in more than a year to allow correspondents to cover the meeting.

A key sticking point in the agreement remains the demand for greater Sikh autonomy in the Punjab. The referral of that issue to a committee studying relations between Indian states and the central government is not likely to win the approval of militant Sikhs, especially those in the Punjab who have lived for more than a year under Army rule and special courts.

"The Sikh pride has been wounded," said a Sikh professional here today. "The youths . . . want to know why they were thrown in jail and beaten all over their bodies, why their fathers were killed and their mothers were raped."

As a result of bloody anti-Sikh riots that followed the assassination last October of Gandhi's mother, Indira Gandhi, Sikhs outside the Punjab no longer trust the government to protect them and feel they need the security of a Sikh homeland, said the professional, who declined to be named.