The NATO military alliance condemned Pakistan's nuclear tests Thursday as a threat to regional security and urged both Pakistan and India to pull back from their intensifying nuclear rivalry.

"We as NATO urge Pakistan and India to exercise maximum restraint," said alliance Secretary General Javier Solana."We strongly condemn both Pakistan and India's nuclear tests, which have profound implications for the security of the region and beyond," Solana told reporters during a meeting of foreign ministers from the 16 NATO allies.

NATO officials said Pakistan now risked "rigorous sanctions," similar to those imposed on India by various nations after its five nuclear tests earlier this month.

The North Atlantic Treaty Organization urged both Pakistan and India to sign up to the nuclear Non-Proliferation treaty.

NATO ministers, including Secretary of State Madeleine Albright, had just opened a two-day meeting when word came Pakistan had detonated two nuclear devices. (Story on A1.)

At that meeting, NATO ordered its military planners to consider possible troop deployments in Albania and Macedonia in case beefed-up allied assistance to those nations fails to prevent the violence raging in Kosovo from spilling over into a wider Balkan conflict.

"We have commissioned military advice on NATO preventive deployments in Albania and the former Yugoslav Republic of Macedonia," the 16 NATO foreign ministers said in a statement.

Among the immediate measures agreed on were increased cooperation to help Albania and Macedonia patrol their borders and joint exercises with forces from the two Balkan nations.

The NATO ministers stressed they hoped diplomatic efforts to encourage talks between the Serbian authorities and ethnic Albanian leaders in Kosovo would bring a negotiated settlement so allied troops will not be needed.

Underlining continued concern about Balkan stability, the NATO ministers approved plans to keep the alliance-led force of 34,000 troops in Bosnia at it's current strength at least until the September elections there.

The 16 ministers said Kosovo's unrest risked jeopardizing the peace agreement in Bosnia and endangered stability in Albania and Macedonia.

"The status quo is unsustainable," they said in a statement released after the first session of their two-day meeting.

To immediately reassure Albania and Macedonia, NATO agreed to step up assistance programs under which NATO has been sending small teams of military advisors to help them secure their borders with Kosovo.