The ministry said the airplane, carrying a four-member Hungarian military delegation, had strayed into Iran's airspace on Sept. 30 because of an "administrative error."
"After clearing up the problem, the airplane was able to continue its journey to Afghanistan," the ministry said in a statement released in Budapest.
The military personnel were part of a Hungarian team that took over direction of Kabul's international airport this month, it said, adding that they were flying in a civilian Hawker 800 plane rented from the private Hungarian firm JAS Cargoways.
Iran's semi-official Fars news agency had initially reported that the plane was American and was carrying five military officials and three civilians from Turkey to Afghanistan when it was forced by the Iranian air force to land at an airport for questioning.
The report prompted a denial from the U.S. military's Central Command, which said in a statement from its headquarters in Doha, Qatar, that no American plane was involved.
Later, Iran's official Arabic-language television station, Al-Alam, quoted an unidentified senior Iranian military official as saying the plane belonged either to a British or Hungarian relief agency.
Both Iranian news reports said Iranian officials questioned the passengers and determined that the entry had been accidental, and that the plane was allowed to continue to Afghanistan the following day.