(CNN) -- The refugees mill about aimlessly amid the rows and rows of white tents that are now their homes.
Girls study this week in Pakistan's Swat Valley. Education for girls is an issue in peace talks there.
Children squat in the dirt playing marbles, while fathers huddle and whisper about what the future holds.
Two hours away, in the town of Mingora in Pakistan's picturesque Swat Valley, their houses lie vacant or reduced to rubble. The town wears a deserted look.
Months of fighting, pitting the country's security forces against Taliban militants, forced nearly half the area's residents to flee.
"We would love to go to our place, but we have the fear inside our hearts," said Umar Khitab, one of the thousands who sought shelter in the U.N. tents.
"We are afraid for our children's lives and for our lives."
Tuesday brought some glimmers of hope. Taliban militants, who are effectively in control of Swat, said they are indefinitely extending a cease-fire they declared eight days ago.
A Taliban spokesman said the radical Islamic movement will work with the government to work out the details of the cease-fire. Their commander in the region, Maulana Fazlullah, would have more to say later in the day, the spokesman said.
The movement also released four security personnel and three civilians it had kidnapped in the area earlier.
Soon after the announcement, militants moved out of some areas in the valley. Bazaars reopened. Residents trickled back, warmly greeting neighbors they hadn't seen in months, said Sardar Rehim Shahzad, district coordinator for police in Swat.
"The situation is much better today than it was yesterday. Much better," he said. "You can see smiles in some faces. But you also see caution."
Militants agreed to a 10-day cease-fire last week after signing a controversial deal with the government to impose Islamic law, or Sharia, in the region.
At the time, Fazlullah said the group would reconvene 10 days later to decide whether to make the halt in fighting permanent.
As part of the agreement, the Taliban is allowing boys' schools to reopen and the government to set up temporary quarters for the more than 200,000 Swat residents who fled.
Girls' schools will remain closed, however.
"Girls will not be asked about their education and professions in their afterlife," Fazlullah said in one of his radio addresses. "When they are in the grave, they will be asked about Islam."
The cease-fire is a major concession by the Pakistan government in its attempt to hold off Taliban militants who have terrorized the region with beheadings, kidnappings, and the destruction of schools -- almost 200 of them.
But the government had little choice but to capitulate, analysts and political observers say.
"There is no police left in the Swat Valley. There are no courts functioning. There are 400,000 refuges from the area. There doesn't seem to be any end to this conflict," said Imran Khan, a former cricket hero turned opposition leader. "So in the end, they had to accept the deal."
It wasn't always this way.
Swat Valley, located in North West Frontier Province, was once one of Pakistan's biggest tourist destinations. It is near the Afghanistan border and about 186 miles (300 kilometers) from the capital, Islamabad.
The valley boasted the country's only ski resort until it was shut down after militants overran the area. The area was also a draw for trout-fishing enthusiasts and visitors to the ancient Buddhist ruins in the area.
But that was before militants -- their faces covered with dark turbans -- unleashed a wave of violence that has claimed hundreds of lives across the North West Frontier Province.
The militants want to require veils for women and beards for men, and to ban music and television.
Anyone found disobeying is pinned to the ground and mercilessly lashed. They are the fortunate ones. Many others were beheaded and hung from poles.
"A notice is attached with the body, stating that if anyone dares to remove the corpse before 48 hours, he will also be beheaded and hanged," said Dr. Ijaz Ahsan, president the College of Physicians and Surgeons, writing in the newspaper The Nation.
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 attacks. They also continued to gain ground, setting up checkpoints throughout the area.
The government's decision now to negotiate with the Taliban has been met with international criticism. Richard Holbrooke, the U.S. special envoy for Pakistan, said the Obama administration was "troubled and confused" by the truce in Swat.
But Ayesha Siddiqa, a security analyst, said the aim of the deal is to use dialogue where force has failed. Success in Swat could win over the United States, she said.
"Publicly, they criticize the deal, but privately they will be happy with it as long as the violence goes down," she said.
The Pakistani army has no illusions. Past efforts to negotiate with the Taliban elsewhere in the country collapsed after some time.
"The military is not being pulled out of the valley; it is still there," said Maj. Gen. Athar Abbas. "The option (to use force) would remain available to the government."
Swat is expected to be front and center as Pakistan's foreign minister, Shah Mehmood Qureshi, makes the rounds in Washington this week.
Back in Swat, Shahzad -- the police district coordinator -- held his breath Tuesday.
"We've tried every kind of weapon," he said. "Maybe it's time to try hope as our weapon."
-- CNN's Zein Basravi contributed to this report.