The mainstream Sikh political party formally called off three years of turmoil in the strategic Indian state of Punjab today, despite differences among three of the party's leaders over the agreement reached with Prime Minister Rajiv Gandhi.

Sant Harchand Singh Longowal, who signed an 11-point agreement with Gandhi Wednesday giving the Sikhs greater religious and political autonomy in Punjab, said his Akali Dal party had endorsed the accord in a unanimous vote.

"The morcha agitation ended with this meeting," he said after a four-hour closed-door session with a broad range of party leaders.

But despite Longowal's optimistic words, there were indications that differences within the Akali Dal's top leadership had not been smoothed over entirely. It was unclear, however, whether these differences within the mainstream Akali Dal party were enough to upset the agreement, which was rejected yesterday by the militant wing of Akali Dal and by a faction of the extremist All-India Sikh Students' Federation.

In the absence of elections, it is difficult to gauge the popular strength of various Sikh groups. Although some Sikhs in the Punjab clearly are unhappy with the terms of Wednesday's accord, there appears to be a growing weariness here with the unrest of the past three years and a desire for peace, even if all Sikh demands for political and religious autonomy are not met.

The Sikh religion combines elements of Hinduism and Islam. Although the Sikhs make up 2 percent of India's 750 million inhabitants, they are among the country's most industrious farmers and entrepreneurs and hold a disproportionate share of command positions in the military and police. They are concentrated in the Punjab, India's granary, located on its western border with Pakistan.

At least 2,000 persons have died in terrorist killings in the state during the past three years, and Rajiv Gandhi's mother, prime minister Indira Gandhi, was assassinated, apparently by Sikh bodyguards, last October.

Today's meeting of the Akali Dal, called to ratify Longowal's agreement with the prime minister to bring peace to the Punjab, combined elements of a religious revival along with political infighting. It was held in one of the five holiest shrines of the Sikh religion, a temple founded 311 years ago by the ninth Sikh prophet that was used to plot the liberation of the Sikhs from their Mogul rulers in the early 1700s.

Political differences bubbled just under the surface. Two top leaders of the party, former Punjab chief minister Prakash Singh Badal and Gurcharan Singh Tohra, the influential leader of the Sikh temple management committee, told their followers they were dissatisfied with the agreement Longowal signed with Gandhi.

"I made my protest at the meeting over every point," said Badal. "I am happy the morcha has been called off, but our problems still remain. They have not been solved, and I am not satisfied."

His supporters gathered outside the temple explained that Badal was especially concerned that the agreement did not set a date for freeing more than 3,000 Sikhs in Punjab who have been jailed over the past year by soldiers and police using broad extraconstitutional powers to quell the unrest.

Moreover, Badal was reported to be pressing demands that the government reinstate thousands of Sikh soldiers who deserted after the Army stormed the Sikhs' most sacred shrine, the Golden Temple at Amritsar, in June 1984 to root out Sikh extremists who had turned the holy place into an armed fortress.

Badal's complaints appeared to have wide support among Sikhs gathered here. "It is not the settlement that we expected," said I.P. Singh, a lawyer here. "We are happy about peace but concerned about the Army deserters being punished and the youth still in jail."

There was speculation among Sikh politicians gathered here that Badal was also irked that he had not been invited to participate in Longowal's talks with Gandhi, and was setting out his opposition to the agreement as a bargaining chip to assure himself a major role in any state government formed by the Akali Dal.

Arjun Singh, the appointed governor of Punjab, returning here from New Delhi where he helped negotiate the agreement between Longowal and Gandhi, expressed confidence that political differences among the Sikhs would not scuttle the accord.

"It might weaken some initiatives, but it's not going to obstruct the process because in a democratic set-up it is public opinion that determines what happens," he said in an interview at the airport in Chandigarh, the federal city that will be turned over to Punjab under the new agreement.

"We will not allow anyone to disturb the peace of the state," he added. "Rather than the administration, it is the general will of the people that will prevail and not allow" violence to continue.

He acknowledged that 3,000 persons were still being detained in the state, but said another 1,300 have already been released and the others should be set free shortly.

At the Akali Dal meeting here, meanwhile, Longowal hailed his accord with Gandhi as "a great and historic victory" for Sikhs and said it was "the first written agreement between the Punjab and Hindustan the rest of India since Maharajah Ranjit Singh," the ruler of a vast Sikh kingdom who conquered the Hindus in the late 1700s.

Underscoring the tensions in the Punjab, each party leader entered the temple compound today surrounded by armed bodyguards.