In depth
The CTBT was negotiated at the Conference on Disarmament in Geneva. India had earlier proposed a test ban in the 1950s, but in 1996 it objected to the draft text. The main objections it stated were the entry-into-force requirement that named states, including India, ratify before the treaty could take effect, and the absence of a commitment to eliminate nuclear weapons within a time frame.
Because India declined to support the text, it was not adopted by consensus at the Conference on Disarmament; the text was taken to the UN General Assembly and adopted with India, Libya and Bhutan voting against. The decision was taken under the United Front government, with Gujral as External Affairs Minister.
The government’s position was that the objection was to the text, not the goal of a ban. Critics saw the stance as preparing the ground for tests, which followed in 1998. Supporters see it as consistent with a long-held position on disarmament and sovereignty. Several details here (exact statement dates and the 20 June 1996 statement) come from search summaries and secondary sources, and the original Conference on Disarmament records should be checked.