Iraq has adopted a new law that gives Prime Minister Iyad Allawi wide powers, including the ability to impose curfews and order house to house searches. The law is part of an effort by Iraq's new interim government to crack down on insurgents and terrorists.

The announcement came Wednesday just hours after mortar shells were fired at the prime minister's home and the headquarters of his political party. A total of six people were injured, but the prime minister was not among them.

Just a few hours later, officials announced the approval of the new National Safety Law. Among other things, it allows the prime minister to impose martial law, with the approval of Iraq's president and the cabinet.

During a news conference Wednesday in Baghdad, Human Rights Minister Bakhtiar Amin, explained when the government would take such action.

"Whenever we feel there is a major danger and threat upon the national security and our institutions and threatening the pillars of the government and causing wide range disturbances, this law will be implemented and we will act upon that," he said.

Imposition of martial law would give the government a wide range of powers to crack down on terrorists who have been trying to derail the democratic process.

The law allows the government to impose curfews and gives the police and military broad powers to make arrests and conduct house-to-house searches.

The new law also features a series of checks and balances aimed at preventing human rights violations.

For instance, those taken into custody would have to appear before a judge within 24 hours of their arrest. Martial law would also be monitored by the Human Rights Ministry for possible abuses.

The law states that martial law cannot be imposed for more than 60 days, although the prime minister, with the approval of the president and the cabinet, can seek a 30-day extension, if necessary.

In extreme cases, the law gives the Iraqi government the right to request the assistance of coalition forces.

However, Justice Minister Malek al-Hassan said Wednesday he is confident Iraqi forces are ready to handle the country's security concerns. Wednesday afternoon, those forces were engaged in a long gun battle with militants in downtown Baghdad before bringing the situation under control.

Justice Minister al-Hassan said emergency laws are needed to battle insurgents who have attacked Iraqi police stations and other government institutions, as well as foreign troops and civilians, and have also killed several new Iraqi leaders.

Senior Iraqi officials said Wednesday, no decision has been made regarding when or where martial law will be imposed, but said there would be no hesitation to do so.