Army resentment at being used to quell opposition to Prime Minister Zulfigar Ali Bhutto ignited this morning's military coup in Pakistan.

The army, which has been the dominant force in Pakistani politics almost from the founding of the Islamic state 30 years ago, was under constant public pressure since being drawn into the bloody aftermath of the general elections in March.

When police in Karachi, Lahore, Hyderabad and other major cities proved incapable of containing demonstrations against Bhutto, the army was sent in and martial law declared. Since then, growing numbers of military men have concluded that the army was being misused for political ends.

The nine-party opposition Pakistan National Alliance quickly sensed the explosiveness of confrontation between military forces and unarmed civilian demonstrators and played its dangerous hand to the utmost, forcing troops to kill unarmed civilians in street demonstrations.

The result was the military takeover an the end of the latest of Pakistan's erratic experiments with democracy.

Both Alliance and Bhutto must share the blame for this failure.

The opposition, particularly its most rigid anti-Bhutto member, retired Air Marshal Ashgar Khan, believed it could put pressure on the army and still retain civilian rule.

Bhutto, who was desperate to keep the power he has held since the loss of East Pakistan in 1971, tried to make the army stand by him against its instincts.

Ultimately, the army decided to seize control rather than see its ranks shattered by internal dissent. Only the army and the bond of Islam hold Pakistan together and if the handful of recent resignations by senior officers had begun to spread, civil war would have been probable.

In this context, the army and its chief of staff, Gen. Mohammed Ziaul Huq. apparently must be credited with a last-ditch attempt to rescue the nation, rather than accused of a self-serving grab for power.

Three weeks ago, when the Alliance and Bhutto appeared to have reached agreement on scheduling fresh elections in October, a military source in Islamabad, the capital, said the army was prepared "to do everything in its power to keep from going back into the streets." This was a reference to the army's role in killing civilians demonstrating against Bhutto.

The officer said that more than 1,000 persons had died in nearly three months of civil unrest since Bhutto's Pakistan People's Party swept 164 of the 200 National Assembly seats in what the opposition claimed was rigged voting. The government said that only 240 had been killed by police and troops and in inter-party battles.

The greatest pressure against the army developed in Lahore, the capital of Pakistan's most populace province, the Punjab. When troops began shooting demonstrators there two months ago, the public grew restive. Lahore is a major military camp city and Punjabis have traditionally filled the ranks of the armed forces.

Wives of Alliance leaders mounted a telephone campaign, telling wives of officers to demand that their husbands stop obeying orders to kill demonstrators.

"After a while it became unbearable," the wife of a young major told a friend in Rawalpindi, another army town.

When Bhutto returned from an unexpected tour of several Middle Eastern capitals late last month, he was to have signed an election agreement with the opposition, but a number of critical differences remained.

As outside might have viewed these differences as insignificant details: but Ashgar Khan said at the time, "Details are very important when you're dealing with someone as slippery as Mr. Bhutto."

Talks resumed but quickly bogged down. Two days ago, Bhutto told reporters in Rawalpindi that the opposition had gone back on the agreement. He claimed that the Alliance wanted to introduce 10 new points and reopen the accord.

There are great divisions in my government about reopening the agreement," he said. While there is some doubt about the truth of this, because Bhutto ran his government and his party single-handled, the comment may gave indicated that Bhutto was aware of the army's plans to stage a coup if an agreement was not immediately forthcoming.

At the same time, the opposition was under pressure from its membership, and there were signs that the Alliance was splitting. "There are shades of difference in PNA thinking." Ashgar admitted in an interview. "But all doubts will be eliminated by the time we sign an agreement."

He also said the Alliance had been receiving irate telephone calls and cables from followers all over the country.

"They've been complaining that we're giving in to Mr. Bhutto by agreeing to fresh elections while he continues in office," he said. "They want him out first. We've got a big public relations job ahead of us."

The army's takeover came a little more than two months after the Joint Chiefs of Staff issued a statement deploring martial Law in three cities, but pledging "to discharge constitutional obligations in support of the present legally constituted government."

At the time, observers in Islamabad concluded that the statement indicated that Bhutto had won over the top leadership. Several observers noted that Bhutto had hand-picked Ziaul and several other top-ranking officers.

More recently however, a military analyst noted that the pledge did not refer to the prime minister by name.

"The army has been putting enormous pressure on Bhutto to continue the negotiations," this officer said.

When it moved this morning, the army must have been convinced that the talks had reached an unbreakable deadlock and that a return to the streets was inevitable.

Military rule is far more common in Pakistan than civilian government. After the British carved the country out of India in 1947 as a homeland for Moslems in the Subcontinent, violence exploded in the Punjab. More than a million Moslems, Hindus and Sikhs were killed.

The earliest efforts to establish parliamentary democracy in the infant state faded with the death in 1943 of Mohammed Ali Jinnah, the founder of Pakistan and for a decade after Jinnah's death, the country fluctuated between periods of parliamentary rule and strongman leadership, including 15 years of military dictatorship under Ayub Khan.

Ayub fell to Gen Yahya Khan in 1969. Yahya oversaw the secession of East Pakistan and hte humiliation of his armed forces by India in December 1971, when an independent Bangladesh was established in the former Eastern wing.

Bhutto took control from Yahya three days after the Pakistani army surrendered on a racecourse in the center of Danca, the capital of Bangladesh.

Bhutto quickly set about pulling the country together. Within two years, he had made Pakistan a showplace of development in the Subcontinent.