The military identified the rocket as the "indigenously developed" surface-to-surface ballistic missile Hatf-III Ghaznavi.
"This was the second test of the Ghaznavi missile which is capable of carrying all types of warheads accurately up to a range of 290km (180 miles)," it said in a statement.
Pakistan said the timing of the test, the first in a series planned for the next few days, was based on the country's own missile defence needs and had nothing to do with developments in the region.
"The timings of the tests reflect Pakistan's determination not to engage in a tit-for-tat syndrome to other tests in the region," the military said.
"Pakistan will maintain the pace of its own missile development programme and conducts tests as per its technical needs."
Peace talks on hold
Tensions with India have eased somewhat this year after the two countries moved close to war in 2002. However, progress towards peace talks has been stymied, partly because of renewed violence in the disputed Himalayan region of Kashmir.
The test also came as US Deputy Secretary of State Richard Armitage was due in Pakistan on Saturday. Armitage will also visit neighbouring Afghanistan in a trip said to be focused on the "war on terror".
"All design parameters have been successfully validated"
Pakistan and India engaged in what were seen as tit-for-tat missile tests last March, when Islamabad tested the short-range Abdali (Hatf-II) missile. India test-fired the nuclear-capable Prtihvi missile in April and then a short-range surface-to-air missile in June.
The Pakistan military said the latest test showed that "all design parameters have been successfully validated".
It said prior notification of the test had been given to neighbouring countries. There was no immediate comment from India.