Pakistan has moved ahead with its clandestine nuclear program to the point where it could detonate an atomic explosion as early as the end of next year, according the latest Western intelligence estimates available here.

Generally, Pakistan has been considered two years away from any nuclear blast, and there have been reports that it has run into unexpected technical snags. There have been other reliable reports, though, that an atomic explosion could be set off this fall. Those estimates, however, now are believed to have been premature.

While the ability for a nuclear explosion may be near, the Reagan administration says it is counting on its $3.2 billion military sales-economic aid package to keep Pakistan from going ahead with any atomic blast.

The martial-law government of President Mohammed Zia ul-Haq gave "absolute assurances" to the Reagan administration that Pakistan has no plans to develop nuclear weapons. Yet Under Secretary of State James L. Buckley acknowledged to Congress that Zia's government had refused to promise not to conduct a nuclear explosion, as India did in 1974.

A nuclear explosion is considered a long way from the development of atomic weapons, but it is nonetheless a giant step toward that end.

The potential of India and Pakistan to develop nuclear weapons is viewed with extreme seriousness around the world since the neighboring nations have fought three wars in the past 34 years. Moreover, tensions between them appear to have increased in the past year because of the U.S. decision to supply arms to Pakistan and India's refusal to take a strong stand against the Soviet invasion of Afghanistan.

Commentators in India, whose detonation of a nuclear explosion in 1974 set off Pakistan's clandestine program to acquire a matching capability, contend that Pakistan will hold off on its atomic blast until it gets the bulk of the weapons wanted from the United States, especially F16s.

However, an unusually well-informed diplomatic source here argued that a military supply relation would not end when Pakistan gets the weapons it is buying.

"A dependency relationship sets in. They continue to need spare parts, technical help," he said.

According to sources here, Pakistan understands that its new relation with the United States ends as soon as Pakistan touches off an atomic explosion.

Just to make sure the Zia government gets this message, the Senate attached an amendment to the foreign aid bill last month would cut off U.S. aid to any nation that detonated a nuclear explosion for the first time. That amendment would cover both India and Pakistan, as well as nations such as Israel and South Africa that are widely believed to have developed nuclear weapons.

The Carter administration refused to accept assurances from the Zia government that Pakistan's nuclear program was purely peaceful and cut off military and economic aid in April 1979.

The Reagan administration is seeking a waiver from Congress of the Symington amendment, which bars aid to countries trying to develop nuclear weapons. The Senate approved the waiver, but the House has not yet taken it up.

Pakistan continually has denied that its nuclear program was aimed at weapons development, but Zia has left open the option of an atomic blast. He told reporters in 1979, however, that there is no such thing as a peaceful nuclear explosion, which is the phrase India invented to describe its 1974 blast.

Zia said in an interview last month that Pakistan needs nuclear energy to overcome the cost of oil.

He added, though, that Pakistan was having problems with its nuclear program "because the West and all our friends are not in a mood to help."

Nonetheless, Western analysts are convinced that Pakistan clandestinely obtained plans and material to set itself on a path toward a nuclear explosion. There are no signs, for instance, that Pakistan is developing the kind of power reactors that would use the weapons-grade enriched uranium it is trying to make with clandestinely obtained equipment at its research facility at Kahuta, 25 miles south of here.

According to informed diplomatic sources here, that research facility is making enriched uranium that could be used for the nuclear blast.

There are also indications that Pakistan may be diverting spent fuel from Kanupp, its only working power reactor, located near Karachi, that could be reprocessed to produce weapons-grade plutonium.

There is no proof, however, that any diversion is taking place from the Canadian-built Kanupp plant, which is under international safeguards. Furthermore, it remains unclear whether Pakistan possesses the facilities to reprocess spent fuel, although there are reports of a small experimental reprocessing plant in the country.

Pakistan's nuclear program is a closely held secret among the country's top officials. Correspondents are not allowed to interview officials of the Pakistan Atomic Energy Office, and a British reporter was beaten in 1979 when he approached the home of a leading nuclear scientist. Two French diplomats were attacked and badly beaten when they came too close to the Kahuta facility. In both cases, plainclothes security men were blamed.

According to intelligence reports here and in New Delhi, neither Pakistan or India has moved from nuclear explosions to trying to develop atomic weapons.

Nor are any recent preparations for nuclear explosions in evidence. Satellite photos this spring showed that India was digging a massive hole at its nuclear explosion site at Pokharan, in the Rajasthan desert, while Pakistan was tunneling in the desert of Baluchistan.

Both India and Pakistan denied they were preparing for nuclear explosions, and according to sources here there has been no tunneling in Baluchistan for eight months. Likewise, India was reported to have stopped its Rajasthan digging before the hole was completed.