The leading Sikh political party, the Akali Dal, elected a temporary leader today and vowed to stand by the party's agreements with the central government.

The party said it would participate in state elections that Prime Minister Rajiv Gandhi has set for next month.

The Akali Dal took the actions during a sometimes stormy six-hour meeting in the Sikh-dominated Punjab capital of Chandigarh. At the same time, the rival radical wing of the party, the United Akali Dal, meeting in the Sikh holy city of Amritsar, failed to agree on an expected election boycott.

The two actions were the first pieces of good news Gandhi has received to counter the assassination of Harchand Singh Longowal, the leader of the Sikhs who have been negotiating with the government. Longowal was murdered Tuesday by radical Sikhs opposed to his accommodation with Gandhi.

The election Sept. 25 will fill the 117 seats in the Punjab State Assembly and 13 seats to the federal legislature in New Delhi. It will be a key test of Sikh sentiment about the peace accords signed by Gandhi and Longowal July 24.

The agreements are widely viewed as one of the few possible ways to resolve the violent three-year-old confrontation between the influential Sikh minority and the Hindu-dominated central government of India.

The accords, under which the government would grant the Sikhs greater autonomy in Punjab and would recognize Sikh cultural, religious and linguistic traditions, have been denounced by Sikh radicals, who have demanded nothing less than an independent Sikh nation.

These radicals, some of whom are thought to have direct links to the All-Indian Sikh Students Federation, are widely believed to have been responsible for Longowal's assassination at a Sikh temple in southern Punjab.

Indian police acknowledged that suspicion today when they arrested a party secretary of the United Akali Dal, Ranjit Singh Brahmpura, in connection with Longowal's death.

Today's Akali Dal meeting in Chandigarh was a critical test of the accords, which several of Longowal's key lieutenants originally opposed.

But the question of endorsing Longowal's agreements with Gandhi proved not to be a major issue. Without any major debate the party's senior leaders, including Sikh officials from many parts of India, voted almost unanimously to honor the accords.

The major issue was the election of an acting president for the key election period.

Two of the party's leading factions were split over the selection. One favored Surgit Singh Barnala, a former national agriculture minister, aide to Longowal and one of the architects of the July 24 accords. Another favored Sant Ajit Singh, another Longowal protege and district leader of the party in Punjab's Ropar district.

The dispute had more to do with personal rivalries than with political differences. It came down to a power struggle between former Punjab governor Parkash Singh Badal, who supported Ajit Singh, and Gurcharan Singh Tohra, of the Sikh temple's powerful management organization, who was a backer of Barnala, the winner.

According to participants, much angry debate preceded the selection of Barnala, a lawyer and long-time Punjab politician. The decision had repercussions: Badal walked out of the gathering when it was clear he had lost.

Of equal significance to the Gandhi government was the indecision of the United Akali Dal faction about the elections.

It had been expected to oppose them, as it had the July 24 accords. One faction of the radical splinter party pressed for participation in the elections, however, arguing that the radicals would be politically isolated if they did not take part.

In the end, no decision was made. But the party did condemn Longowal's assassi ation and observed two minutes of silence in his memory.

The decision on whether to participate in the elections or boycott them was left to the party's titular head, Joginger Singh, 83, father of the fiery Sikh preacher Jarnail Singh Bhindranwale, who was killed last year when troops stormed the Sikhs' Golden Temple at Amritsar.