ISLAMABAD, Pakistan (CNN) -- Taliban militants released a kidnapped Pakistani official in exchange for two of their men in the troubled Swat Valley, government officials said Monday.
Pakistani journalists shout slogans during a protest in Karachi against the killing of a journalist in Swat Valley.
Kushal Khan was on his way to take up his new post as the district coordination officer Sunday when unknown gunmen kidnapped him and six members of his security detail near Mingora, the valley's main city.
Late Sunday, Khan and his security guards were released after two Taliban militants were freed in a swap, said Syed Muhammad Javed, division commander of the Malakand region, where Swat is located.
Taliban spokesman Muslim Khan confirmed the exchange.
Kushal Khan was seized a day after the provincial government declared a permanent cease-fire agreement with Taliban militants in the valley.
Yet, hours after the announcement, Maulana Fazlullah -- the Taliban commander in the area -- was playing down the agreement with aggressive rhetoric in a radio broadcast. Fazlullah said militants would continue their fight to impose Islamic law, or Sharia, in the region. Watch cease-fire deal with Taliban »
Swat Valley, located in North West Frontier Province, was once one of Pakistan's biggest tourist destinations. It is situated near the Afghanistan border and about 300 kilometers (186 miles) from the capital, Islamabad.
In recent months, militants have unleashed a wave of violence that has claimed hundreds of lives across the North West Frontier Province.
The militants want to veils to be made compulsory for women and beards for men, and to ban music and television.
The fighting has displaced nearly half of Swat's population, officials said.
The central government has long exerted little control in the area, but it launched an intense military offensive in late July to flush out militants.
As retaliation for the military presence, the Taliban carried out a series of deadly bombings, beheadings and kidnappings -- and said the attacks would continue until the troops pull out.
On Saturday, the government of the province said it had reached a deal with the Taliban for a permanent cease-fire.
It marked a major concession by the Pakistani government in its attempt to hold off Taliban militants.
The agreement means boys' schools will reopen on Monday and camps will be set up for Swat residents who have fled the fighting or whose homes had been destroyed. Watch what sharia law requires »
CNN's Zein Basravi contributed to this report