"The missile Hatf-VI (Shaheen-2) has a range of 2000 km and can carry both nuclear and conventional warheads," the military said in a statement.
Prime Minister Yousaf Raza Gilani watched the test of the surface-to-surface missile and congratulated engineers and scientists for achieving an ‘important milestone’ in Pakistan's quest for sustaining strategic balance in South Asia, it said.
Nuclear-armed Pakistan and India routinely carry out missile tests despite a peace process they launched in early 2004.
The South Asian neighbours, who conducted tit-for-tat nuclear weapons tests in 1998, inform each other of missile tests in advance.
The military cited Gilani as saying the missile and nuclear programme enjoyed complete national consensus and would continue to be consolidated and strengthened.
"He made it clear that Pakistan's strategy of credible minimum deterrence is fully in place and is a guarantee of peace in the region," the military said.
Gilani also gave an assurance that the country's defence needs would remain a high priority with the elected Government, the military said.
Indian Foreign Minister Pranab Mukherjee is due to visit Pakistan next month for a review of the peace process.