"Yemen expresses its regret and surprise at the decision of Germany, with which it maintains good relations of friendship and cooperation, to ban all flights," a government spokesman said, quoted by the official Saba news agency.
Yemen's partners should help the country "reinforce its efforts to beat terrorism instead of resorting to decisions which can only be likened to collective punishment," the spokesman said.
Germany's decision was "illogical and penalises Yemen and its people who reject terrorism," the Yemeni spokesman said.
Two parcels addressed to Jewish institutions in Chicago containing the lethal explosive PETN hidden in ink toner cartridges were uncovered in Britain and Dubai on Thursday on cargo planes en route to the United States.
They had been posted in Yemen and have been linked to the group al-Qaida in the Arabian Peninsula and a bomb maker believed to be hiding in Yemen.
The bomb found in Britain had been routed via the western German city of Cologne.
Germany on Monday extended a ban on air freight from Yemen to passenger planes, becoming the first to reject all flights from the Arabian peninsula nation after other countries moved to stop only cargo.
"This type of hasty and exaggerated decision can only damage Yemen's efforts to fight terrorism and can only serve the interests of terrorists who seek to hurt Yemen and its relations with its friends and its regional and international partners," the Yemeni official said.
"Yemen is one of the countries that has suffered the most from acts of terrorism committed by Yemenis or foreigners, which have caused considerable damage to its economy, notably to tourism and investment."
The country is committed "in the campaign against terrorism and needs the support of all its friends because terrorism is a danger that threatens the whole world," the official said.
The German government said Monday its air authorities "have orders to turn back all direct and indirect flights from Yemen."
It was weighing whether to ban freight from other countries amid a major security review, an official said.
London has also suspended all unaccompanied air cargo from Yemen and extended the ban to cargo from war-torn Somalia.
The Netherlands on Monday suspended cargo and mail flights originating in Yemen, and France has also suspended air freight.
A US official said Monday that the United States had intercepted parcels from Yemen in September thought to be a dry run for the package bomb plot.
The dry run contained household goods including books, religious literature, and a computer disk and were shipped by "someone with ties to al-Qaida in the Arabian Peninsula," a US official told ABC News.