NEW DELHI - India's first nighttime test of a medium-range missile was a failure, missing its target, a defence ministry official said Tuesday.

India test fired the surface-to-surface "Agni-II" (Fire) missile from Wheelers Island in the eastern state of Orissa on Monday.

"It couldn't hit the target," the official told The Associated Press on condition of anonymity in line with ministry rules.

"The liftoff was smooth, even the first stage of separation was smooth. But there was some problem during the second stage of separation and it deviated from its co-ordinated path," the official said.

The Agni-II, with a range of up to 2,000 kilometres, is capable of carrying both conventional and nuclear warheads weighing up to 1,000 kilograms, the official said.

India has a variety of missiles including the short-range Prithvi ballistic missile, the medium-range Akash, and the supersonic Brahmos.

India's missiles are mostly intended for any confrontation with neighbouring archrival Pakistan, but the Agni-II can put areas in southern China within striking range.

India's previous missile tests have been done during the day.

"The Indian army wants to confirm a 24-hour operational cycle and to be able to fire under the cover of darkness," said Rahul Bedi, a defence analyst with Jane's Defence Weekly.

Monday's test is unlikely to aggravate tensions between India and Pakistan as they both routinely test fire missiles.

It was not immediately known whether New Delhi informed Islamabad about Monday's test, which is the normal practice.

India and Pakistan have fought three wars since their independence from Britain in 1947, two over control of the Himalayan region of Kashmir.