Sikh gunmen assassinated mainstream Sikh political leader Harchand Singh Longowal in Punjab this afternoon, less than a month after he signed an agreement with the central government in New Delhi granting a measure of autonomy to the strategic northern state where sectarian turmoil has taken more than 2,000 lives in the past three years.

Longowal, 53, leader of the moderate Akali Dal party, died of his injuries several hours later after undergoing emergency surgery in the town of Sangrur. One of his supporters also was killed and three others injured in the attack by four gunmen, according to police, and two of the assailants were captured.

The July 24 agreement paved the way for state assembly elections and balloting for the federal parliament set last week for Sept. 22 that were seen as a major bid to return normalcy to the violence-wracked state although Longowal and others had voiced fears that an election campaign before the accord had been firmly consolidated could provoke fresh violence.

Militant Sikhs seeking an independent Punjab dismissed the pact as a "sellout," however, and longstanding extremist threats were renewed against Longowal. He also encountered some opposition to the accord among party rivals but had succeeded earlier today in smoothing over those differences.

In other political violence today, in the Punjab town of Jullunder, two gunmen shot and killed a local leader of Prime Minister Rajiv Gandhi's Congress-I Party, and wounded district party official Gurdial Saini in the attack at Saini's home.

Today's attacks marked a renewal of terrorist activity, which had fallen off after the July pact. Army troops in Punjab were placed on alert tonight to guard against fresh outbreaks of violence. It was not clear tonight if there would be any change in the Sept. 22 voting date.

In New Delhi, Gandhi, who called Longowal's death "a tragedy not just for the state of Punjab but for the whole country," said, "We must keep calm and not allow ourselves to be deflected from the party of unity and brotherhood which he followed."

[In Washington, the State Department said that the United States "strongly deplores yet another assassination of a prominent Indian leader." A statement issued by the department said, "Further bloodshed is a blow not only to India but to the democratic values and traditions many nations Like India cherish and uphold," The Associated Press reported.]

Gandhi's mother and predecessor as prime minister, Indira Gandhi, was assassinated last October by Sikh bodyguards in what was widely seen as an act of retaliation for the storming in June 1984 by Indian Army troops of the Sikhs' holiest shrine, the Golden Temple in Amritsar, to root out armed Sikh extremists sheltered there. Her assassination touched off widespread violence by Hindus against Sikhs.

Since taking office Rajiv Gandhi has pursued a succession of agreements to ease the country's key ethnic and religious conflicts.

When he was shot, Longowal was addressing a rally of supporters to explain the reasons why he signed the 11-point accord with Gandhi, which included provisions to make Punjab more of a Sikh state and to grant the state more political autonomy, paving the way for next month's elections in the now federally governed province.

He spoke after reaching agreement earlier today with two Akali Dal rivals, Prakash Singh Badal, and Gurcharan Singh Tohra, who command a broad popular and religious base in the state and who had criticized various details of the pact with Gandhi. After prolonged discussions, the three had agreed to end their differences and mount a united campaign in September's voting, a move that observers saw as reaffirming Longowal's undisputed leadership in moderate Sikh politics.

As he was addressing the gathering, four youths got up from the audience and unleashed a hail of gunfire at the podium from which Longowal was speaking. Wounded in the abdomen and upper torso, he was rushed from Sherpur to the nearby town of Sangrur where surgeons sent by the government fought vainly to save his life.

Two of the four assailants, who tried to flee after the attack, were caught in the crowd and turned over to authorities, who identified them Halwinder Singh and Gian Singh, according to news agency reports from the scene. Halwinder Singh was wounded by Longowal's bodyguards, according to the United News of India. Police were seeking the other two gunmen.

Longowal will be cremated at his native village of Longowal Wednesday. Two days of mourning have been declared in the state.

Political commentator Pran Chopra tonight suggested that the assassination of Longowal would generate "a great deal of resentment against extremists" and "certainly not cause communal violence" to flare again in Punjab.

Reporters who visited the state in the aftermath of the signing of the accord with Gandhi noted widespread weariness among the general populace with the violence of the last three years, and many voiced the hope that the pact would bring peace even if it did not meet all Skih demands for political and religious autonomy.

Moderate critics had noted that the agreement failed to set a date for the release of more than 3,000 Sikhs jailed under broad special powers invoked to quell the unrest in Punjab. It also did not meet demands that the government reinstate thousands of Sikh soldiers who deserted after the storming of the Golden Temple. (The Army Sunday announced the reinstatement of 900 of the estimated 2,700 deserters and said 237 others would be allowed to join paramilitary forces.)

The accord had been rejected immediately by the militant wing of the Akali Dal, headed by Joginder Singh, father of Jarnail Singh Bhindranwale who spearheaded the extremist campaign for independence. Bhindranwale was killed along with hundreds of other Sikhs in the assault on the Golden Temple complex. The pact also was denounced by a faction the hard-line All Indian Sikh Students' Federation.

The Sikh religion includes elements of Hinduism and Islam. Sikhs make up 2 percent of India's predominantly Hindu population, comprising a majority only in Punjab, but hold a considerable share of command positions in the nation's military and police.