The announcement came as Iran's clerical leaders also dug in on their refusal to allow tougher United Nations inspections of their civil nuclear programme, seen by the United States as a cover for nuclear weapons development.
"The test took place several weeks ago. The range of the missile is what we declared before," foreign ministry spokesman Hamid Reza Asefi told reporters, adding the test was the final one before the missile is handed over for operation by the country's army.
Officials here have previously said the missile -- based on North Korea's No-Dong and Pakistan's Ghauri-II -- has a range of 1,300 kilometersmiles). It can reportedly carry a warhead weighing up to 1,000 kilogrammes.
In Farsi, Shahab means "meteor" or "shooting star".
Asefi was reacting to a report in the Israeli Haaretz newspaper last week which said Iran had conducted the test just over a week ago and was now capable of hitting the Jewish state, American forces in the Gulf or the Indian subcontinent.
"This is nothing new," Asefi said. "Apparently the Israelis are a bit late with their information."
Confirmation of the test came as Iran was set to face more scrutiny over its nuclear programme, with International Atomic Energy Agency (IAEA) director Mohamed ElBaradei set to visit Wednesday to press demands for tougher inspections.
But Asefi again rebuffed mounting international demands to immediately and unconditionally allow tougher UN inspections of its nuclear facilities, asserting instead that drawn-out negotiations may be necessary.
"There is no have-to involved. We hope that in negotiations with Mr. ElBaradei, the two sides can cover subjects that allow us to build mutual trust," he said, adding that "if not, negotiations must continue."
The IAEA has been urging Iran immediately sign, ratify and implement an additional protocol to the nuclear Non-Proliferation Treaty (NPT) that would allow its teams to conduct surprise inspections of suspect sites.
So far the Vienna-based UN body is only allowed to pay pre-arranged visits to declared sites, but Iran has been urged to open up its nuclear programme amid widespread fears it is also seeking to acquire a nuclear arsenal.
ElBaradei has been backed up by G8 leaders and the European Union. Individual states, Japan, France, Britain, Australia, Russia and the United States have also echoed the demand. Foreign diplomats here have asserted they are not prepared to see lengthy negotiations on the issue.
But Asefi said that for Iran, the additional protocol problem is "not a black and white issue".
"For every problem there is a solution, and for this problem we must negotiate and we are fully ready to listen," he told reporters.
In June, ElBaradei said the Islamic republic had not fully respected the NPT by failing to inform the IAEA of some of its nuclear activities, including the import of uranium in 1991.
Iranian officials have dismissed the criticisms as technicalities, and have consistently asserted they are ready to allow a tougher inspections regime, but only on the condition that other NPT signatories first assist its nuclear power programme -- one of their treaty obligations.
Asefi also dismissed threats from some EU quarters that negotiations over a trade and cooperation agreement -- which the EU hopes will yield progress on political, human rights and military concerns in Iran -- could be torpedoed by Iran's intransigence on inspections.
"The commercial cooperation accord would be profitable for both sides, so this cannot be used as leverage and the Islamic republic will not accept such pressure," he said.
"Sanctions against the Islamic republic have been ineffective. The Europeans should be careful about what they say and avoid using threats."