Pakistan President Asif Ali Zardari signed a regulation late on Monday night to put the SWAT Valley under Islamic law as part of a peace deal with the Taliban.
He signed the law after having come under intense pressure from members of his own party and other lawmakers.
The regulation is sure to further fears among the US and other Western allies that the Valley will turn into a sanctuary for militants close to Afghanistan.
Earlier, a Taliban spokesman had warned lawmakers against opposing the deal.
Zardari's signing implemented a deal agreed to in February by provincial officials to impose Islamic law in the SWAT Valley and surrounding areas in exchange for a ceasefire between security forces and the local Taliban.
Zardari had earlier said that he will not allow enforcement of the Islamic law in SWAT till peace is restored completely.
Imposition of Islamic law is one of the main demands of the Taliban, who reached the peace deal with the North West Frontier Province (NWFP) government in February, ending 18 months of violence in the region that left hundreds of people dead.