The United States and Pakistan announced agreement yesterday on a multiyear military and economic aid program that will include the sale of F16 fighter-bombers to Pakistan.

The announcement of the agreement, which would total more than $3 billion in military and economic sales and assistance over the five years beginning in October, 1982, was made in Islamabad at the conclusion of a five-day visit to Pakistan by an American delegation headed by James L. Buckley, undersecretary of state for security assistance. With this accord, the two countries resumed a relationship that was ruptured two years ago because of evidence that Pakistan is developing nuclear weapons.

The announcement described a two-phased resumption of economic and security ties between the countries, beginning with the cash sale of some American military equipment to Pakistan this year.

Those cash sales would be followed by a five-year program of economic support and development assistance funds and foreign military sales loans totaling about $3 billion, according to the announcement.

In Islamabad, Pakistani Foreign Minister Agha Shahi said about half the $3 billion will be in the form of economic assistance and about half will be military aid.

The announcement of the agreement specifically pledged the United States to sell an unspecified number of F16s to Pakistan. But other details of the agreement, including the size and makeup of the cash sales of military hardward this year, were not spelled out.

Shahi said a team of Pakistani military and defense officials will leave for Washington later this month to discuss the details of the sale. He said the cash sale would be financed partly by Pakistan's "Islamic friends," which are expected to be cheifly Saudi Arabia. The size of the cash sale could are expected to be cheifly Saudi Arabia. The size of the cash sale could push the overall amount involved in the program well above the $3 billion mentioned in connection with the five-year aid program.

Yesterday's announcement culminates months of negotiations that were begun in the carter administration following the Soviet Union's invasion of Pakistan's neighbor, Afghanistan. The Carter adminsitration had proposed a two-year, $400 million aid program, which Pakistan contemputously rejected as "peanuts."

The United States sought to renew its military and economic ties to Pakistan as a bulwark against further Soviet expansion on the Indian subcontinent. For its part, Pakistan feels threatened not only by the presnece of Soviet troops in Afghanistan but by growing Soviet military aid to its traditional enemy, India.

Coming just after Israel's attack on a nuclear reactor in Iraq, the Reagan administration's plan to resume military and economic ties with Pakistan will almost certainly set off a major debate in Congress over both arms sales and nuclear nonproliferation policies. There was no mention in the Islamabad announcement of Pakistan's nuclear program, and at the State Department spokesman David Passage would say only that Pakistan is "well aware" of American concern that it may be developing nuclear weapons. i

There are no legislative prohibitions against cash sales of military equipment to Pakistan. However, in order to implement the five-year, $3 billion aid program, the administration will have to win congressional approval of legislation exempting Pakistan from the terms of the Symington amendment, which bars aid to a country that seeks to build nuclear weapons.

Under provisions of the amendment, all aid to Pakistan was cut off in 1979. Last month, the Senate Foreign Relations Committee apprived legislation authorizing President Reagan to exempt Pakistan from provisions of the amendment in order to supply it with $100 million in economic aid in the next fiscal year. The House Foreign Affairs Committee did not act on the request, saying it first wanted to see the terms fo the long-range agreement that was announced yesterday.

Rep. Stephen J. Solarz (D-N.Y.), chairman of the House subcommittee on Asian and Pacific affairs, said hearings will be held on the proposal in the next week or two. Solarz said that in light of the Soviet invasion of Afghanistan there exists a "powerful case" for renewed American aid to Pakistan.

At the same time, he said the Israeli raid on the Iraqi nuclear facility -- accomplished with American-supplied F16s like those the administration proposes to sell to Pakistan -- has heightened congressional concern over nuclear nonproliferation and arms sales policies