By Michelle Nichols

UNITED NATIONS (Reuters) - The United Nations Security Council urged China, the United States, North Korea, Egypt, India, Iran, Israel and Pakistan to ratify a treaty banning nuclear explosions, which would allow the deal negotiated 20 years ago to come into force.

More than 160 countries have ratified the 1996 Comprehensive Nuclear-Test-Ban Treaty (CTBT). Since then India, Pakistan and North Korea have conducted nuclear tests. This month Pyongyang conducted its fifth and largest test.

The 15-member Security Council adopted a U.S.-drafted resolution on Friday with 14 votes in favor and an abstention by Egypt. It does not impose any legal obligations but adds political weight to the push for the treaty to be enacted.

The U.N. resolution calls on all states to refrain from conducting any nuclear explosions.

U.S. President Barack Obama's administration has said it would like to ratify the treaty, but a number of U.S. lawmakers, especially Republicans, oppose ratification of a pact they fear would limit U.S. security options.

"Our affirmative vote here is a sign of our unwavering commitment to a safer world in which nuclear technology is used solely for peaceful purposes and the risk of nuclear conflict is no more," U.S. Secretary of State John Kerry.

He said the resolution does not impose a legal prohibition on testing or require governments to adopt new reporting.

"But it does reinforce the core purposes and objectives of the CTBT itself: to diminish our reliance on nuclear devices, to reduce competition among nuclear powers, and to promote responsible disarmament," Kerry told the council.

U.N. Ambassador Vitaly Churkin of Russia said Moscow hoped the next president of the United States would be "more strident in his desire to ratify it." The United States is due to elect a new president on Nov. 8. Obama will step down in January.

Egypt's Hisham Badr, assistant foreign minister for multilateral affairs, described the resolution as "substantively flawed and ill-suited to be addressed in the Security Council."

"Its contribution to the nuclear disarmament regime is minimal and ineffective. Rather than strengthening this regime, the resolution squanders the opportunity to emphasize the urgency to advance nuclear disarmament," he told the council.

(Reporting by Michelle Nichols; Editing by Howard Goller)