A U.S. decision to delay delivery of promised F16 fighter planes to strategically vital Pakistan has eroded public confidence in the United States as a dependable ally and revived anti-American feelings here.

The announcement last June of the sale of the highly coveted F16 to Pakistan -- which became a front-line state against the Soviet Union when Moscow sent 85,000 troops into neighboring Afghanistan -- placed this country in the company of close U.S. allies such as Israel, Egypt and the NATO nations.

According to the original announcement made at the conclusion of talks here between Under Secretary of State James Buckley and Pakistani officials, the F16s were to be sent on an urgent basis, and the first two of an estimated 36 fighters were expected to arrive by the end of the year.

But a reliable source here said the planes are unlikely to arrive here for another two years at the earliest.

The martial-law government of President Mohammed Zia ul-Haq is trying to keep a lid on expressions of resentment over the delay, but they surfaced in statements made to senior American diplomat David T. Schneider when he passed through Pakistan on his way to Washington to assume the post of deputy assistant secretary of state with responsibility for this region. Similar statements were made at two public forums held by Foreign Minister Agha Shahi.

The views also came through clearly and spontaneously during more than a week of conversations with Pakistanis of all walks of life here in the capital city, in Lahore, the country's most politically aware city, and in three small cities of the Punjab, Pakistan's most populous province.

The sale of the F16s was in addition to a $3 billion dollar, five year military sales and economic aid agreement between Pakistan and the United States scheduled to start in October next year. The jet fighters were to be a straight cash purchase by Pakistan before the main deal went into effect, probably with money from Saudi Arabia.

The Reagan administration favors strengthened ties with Islamabad as part of Secretary of State Alexander M. Haig Jr.'s "strategic concerns" from Pakistan west to Turkey to protect the oil-rich Persian Gulf from Soviet attack.

The F16 sale was seen as signaling Moscow not to move any further toward the Khyber Pass, on this country's sensitive border with Afghanistan, because the United States had a firm interest in preserving Pakistan's independence. Furthermore, U.S. policy planners saw the sale of the top-of-the-line aircraft as a means of bolstering Pakistan's will to resist any incursions.

"We're buying their willingness to stand up," said a senior American diplomat.

But that newly instilled confidence in the United States' interest in Pakistan seems to be eroding because of the time lag in getting a visible symbol here -- a few F16s. According to sources who were there, a group of prominent Pakistanis sharply attacked the delay in their meeting in Lahore with the State Department's Schneider.

More criticism surfaced during a forum in Karachi last week on the Pakistan-U.S. arms deal. In the first public reference in this country to the delay, the government-controlled Pakistan Times carried on page one a censored report on the forum by the news agency Associated Press of Pakistan, which said:

"Virtually all the speakers expressed great concern about the time lag in the delivery of the U.S. weapons . . . If America really felt that Pakistan faced an immediate threat to its security, they the speakers wondered why the actual delivery of these urgently needed weapons would take years and years, especially since the quantities involved are not large."

News of the delay surfaced after a Pakistani military delegation visited Washington last month to firm up the list of this country's arms needs and spread quickly in the country after being broadcast on the British Broadcasting Corp. and the Voice of America -- the usual sources of news that the martial-law government would prefer to keep secret.

Even before the news of the F16 delay, however, there was widespread and open questioning of the wisdom of forging closer ties with the United States, which in the 1950s and early 1960s had considered Pakistan one of its firmest allies and had supplied the bulk of the weapons for Pakistan's armed forces.

Pakistan's nuclear program and U.S. concern that it would lead to proliferation of nuclear weapons have been a major deterrent to better U.S.-Pakistani ties, but Buckley reported to Congress that Zia had assured him this country was developing atomic energy for peaceful purposes. The Carter administration had refused to accept similar assurances.

Despite official denials, many Pakistanis are speculating that the Zia government made secret deals with the United States either to refrain from any nuclear explosions during the five-year life of the program or to allow the Americans to set up bases here in case of any conflict in the nearby Persian Gulf.

Underlying much of this questioning is the widely held belief among Pakistanis that the United States failed to be a true friend in the past and let it down in two of its wars with neighboring India. "Past experience had shown that the United States is not a dependable ally," Lahore High Court Justice Javed Iqbal was quoted in press accounts as telling a forum in Lahore.

The incipient anti-Americanism does not appear to be orchestrated by the Zia government, which from all signs genuinely wants the new links with the United States and feels that the Reagan administration is offering long-term benefits that far outweigh anything proposed by former president Carter.

Meanwhile, work has started on rebuilding the U.S. Embassy that was gutted by a mob of Pakistani youths in November 1979 -- the most visible sign here of Pakistan's anti-Americanism. More than 100 embassy employes, at least half of them Americans, barely escaped with their lives in that attack. Pakistan has paid $13.5 million to cover the reconstruction costs.