The indigenously produced Babur missile, which has a range of 500 km (310 miles), was successfully tested, said the spokesman, Major-General Shaukat Sultan.
Nuclear-armed rivals Pakistan and India reached an agreement last week to inform each other about missile tests but Sultan said India was not told about Thursday's test as the accord did not cover the Babur missile.
"We don't have to inform neighbouring countries in this case. It is not a ballistic missile and it doesn't fall under the agreement," he said.
The Babur is a terrain-hugging missile that can avoid radar detection and strike with pinpoint accuracy, the military said.
"By conducting the successful test, Pakistan has joined a select group of countries which have the capability to design and develop cruise missiles," the military said in a statement.
Pakistan and India tested nuclear weapons in 1998.
President Pervez Musharraf hailed the test as a milestone in Pakistan's quest to strengthen and consolidate its strategic capability and said it improved the military balance with India, reports Reuters.
According to Times, the missile could avoid radar detection to penetrate hostile defensive systems "with pinpoint accuracy", the statement added, and could also be launched from ships, submarines and aircraft.
According to the Federation of American Scientists, at least 12 countries export cruise missiles: Britain, the United States, China, France, Germany, Israel, Italy, Japan, Norway, Russia, Sweden, and Taiwan.
India unveiled its first cruise missile, a supersonic joint venture with Russia in 2001. Pakistan and India conducted tit-for-tat test nuclear detonations in 1998 and came to the brink of war in 2002. The historical rivals, who have already fought three wars, routinely carry out tests of nuclear-capable missiles.
On Saturday, they signed the long-awaited deal to set up a nuclear hotline to alert each other in advance of missile tests. The telephone link is to be set up by September.
Pakistan last test fired a missile on Nov. 29, when it launched the short-range nuclear-capable ballistic Hatf-III of the Ghaznavi series, which has a maximum range of 290 kilometers.
Pakistan and India have moved to repair relations since April 2003. The nuclear-armed neighbors have restored diplomatic, transportation and sporting links since then.
On Aug. 8, the two countries agreed to maintain the cease- fire on the border separating them as part of confidence building measures to ease tensions. Last week Pakistan and India agreed to notify each other before testing ballistic missiles.
Rescuers found the pilot of one of the two Su-34 fighters that had collided in midair in the Far East on January 18