Pakistan today formally accepted a $3.2 billion, five-year arms sale and economic aid package with the United States after the Reagan administration agreed to speed up the delivery of top-of-the-line F16 fighter-bombers.

The martial law government of Mohammed Zia ul-Haq apparently made a U.S. speedup on the delivery of the F16s a condition of his acceptance of the arms-aid agreement.

The accord, announced tonight in Islamabad, nails down a cornerstone of the Reagan administration's efforts to build a "strategic consensus" area to confront the Soviet Union. That swath stretches from Pakistan on the east through the oil-rich Arab nations of the Persian Gulf to Israel, Egypt and Turkey on the west.

According to diplomatic reports reaching here, the United States promised to send six of the 40 jet planes to Pakistan in 12 months instead of beginning delivery after a 26-month waiting period as originally envisioned by the Reagan administration.

In Washington, American officials said early delivery was made possible through an agreement with the Netherlands and Belgium by which these two nations will deliver to the United States F16s coproduced in their countries. This would give the U.S. Air Force spare F16s that could be sent to Pakistan, the officials said.

State Department spokesman Dean Fischer made no reference to Belgium and Holland. But he said any F16s delivered to Pakistan will be of U.S. manufacture.

Even a two-year delivery time was considered speedy for the highly coveted F16s, which are being supplied only to America's most steadfast allies.

Agreement on the package waspresaged by an agreement in principle reached in June, when Under Secretary of State James Buckley visited Islamabad to confer with Zia and Pakistani Foreign Minister Agha Shahi.

For Pakistan, which just two years ago was a nation isolated both from the United States and the Western alliance, the agreement marks a major turnabout. All American military and economic aid had been terminated in April 1979, because of what the United States charged was Pakistan's clandestine program to build nuclear weapons.

Relations between the United States and Pakistan, once firm allies, reached a low point in November 1979 when Zia's martial law government allowed a mob of Islamic zealots to burn the U.S. Embassy in Islamabad.

But as a result of the Soviet invasion of Afghanistan 22 months ago, Pakistan has become a frontline bulwark against communist expansion. Pakistan was wooed unsuccessfully by the Carter administration, which offered Zia an aid package of $400 million. Zia rejected it as "peanuts."

According to diplomatic sources in Washington, Buckley, on a return trip to Islamabad last week, satisfied Pakistan's objections to the delay in delivery of the promised F16s. So important was an early delivery date to Zia that he publicly cast doubt on the reliability of the United States as an ally.

The six planes will be delivered in a year, with the remainder of the two squadrons -- 34 planes -- starting to arrive in 27 months as originally agreed upon.

Authoritative sources said about $2 billion of the package would be spent for military equipment such as the F16 jets, tanks, air defense missiles and advanced communications systems.

Still unclear, however, is how Pakistan plans to pay for the F16s, which Pakistan was to buy originally under a straight cash purchase added on to the aid package.

Pakistan indicated the money would be coming from its "Islamic friends," generally assumed to be Saudi Arabia, which American diplomatic sources indicated had pledged at least $50 million to finance Pakistani arms purchases. That would cover about half the cost of two squadrons of F16s

There has been no public word, though, from the Saudis or any other Arab nation of a willingness to bankroll Pakistan's arms purchases.

American diplomats, explaining the administration's embrace of Zia, readily acknowledge the lack of popular support for his military government. But he has remained in power for four years -- far longer than anyone thought when he took over in a military coup -- and there appears to be no solid opposition to Zia either among the civilian politicians or his fellow Army officers who are his real constituency.

With the U.S. aid, American diplomats said, the Reagan administration believes Zia will be able to defend his country against Soviet cross-border incursions such as the attack against a small village in Baluchistan he announced -- but which Afghanistan denied -- during Buckley's visit.

Moreover, the Reagan administration feels it will put Moscow on notice that the United States considers Pakistan part of its sphere -- not to be interfered with -- and it will strengthen Islamabad's resolve to stand up to diplomatic pressure from the Soviet Union and India, which has taken a far softer stance than Pakistan on the Soviet invasion of Afghanistan.

The American aid package to Pakistan has been vehemently opposed by Indian Prime Minister Indira Gandhi, who insisted it would add a new level of military technology in South Asia, spark an arms race in the region and set back attempts to build better relations between India and Pakistan, who have fought three wars since they gained independence 34 years ago.

The Indians, however, already have received a squadron of Soviet made MiG25 jets and expect more.They also are assembling British-French Jaguar aircraft and Gandhi is expected to sign an agreement to buy Mirage 2000s from the French when she visits Paris later this year.

Moreover, India last year concluded a $1.6 billion arms deal with the Soviet Union on terms so favorable that Pakistan says it is really worth $8 billion. The State Department puts the deal at $5.5 billion.

The Pakistani announcement on the agreement said that Pakistan was ready to start immediate talks with India "for the purpose of exchanging mutual guarantees of non-aggression and non-use of force."

The U.S. Congress starts debating the package this week and must give its approval before the money becomes available over five years.