A smudge of dirt marked the boy's face. His father, Mohammed Ayaz, anxiously talked of how he and his wife could feed Maaz only tea and biscuits -- the only food they could get their hands on at the refugee camp.
"We've asked for milk, but there's none available," Ayaz said. "We're worried about our boy."
Such moments of anguish abound at the Sheikh Yaseen camp in this chaotic, sun-baked city that has become the hub for Pakistanis fleeing the fighting in the Swat Valley, about 30 miles to the north.
Support for the military offensive against the Pakistani Taliban in the northwest has been widespread, cutting across economic and ethnic lines. But that support hinges precariously on how Pakistan manages the massive humanitarian crisis created by the war's displacement of an estimated 3 million Pakistanis.
About 200,000 of the displaced people, nearly all ethnic Pashtuns, are crammed into sprawling tent camps in Mardan and elsewhere in the country. The rest have sought refuge with relatives or friends. At Sheikh Yaseen, more than 7,600 people live in 1,485 tents.
The Pakistani military launched the offensive in April after Taliban militants based in Swat began to assert control over adjoining districts, one of them just 60 miles from the capital, Islamabad.
The broad support for the military campaign could be undermined if the flow of displaced Pashtuns to other regions and cities triggers ethnic tensions. Thousands of Pashtuns have sought shelter in camps and homes in the southern port city of Karachi, where political leaders of the majority ethnic Sindhi population have vehemently opposed their influx.
More than half of Karachi's shops and markets closed May 25 after Sindhi nationalists called for a citywide strike to protest the arrival of Pashtuns from Swat. In the past, many Sindhis have opposed the settlement of Pashtuns in Karachi, saying their presence marginalizes locals and takes away jobs.
Pakistanis have been encouraged by reports of the gains being made by the troops against militants, and, experts say, they are realizing how severe of a threat the Taliban poses if allowed to spread unchecked.
That threat was underscored late last month by a suicide bombing outside security buildings in Lahore that killed 27 people and injured more than 250. Pakistani Taliban leaders have claimed responsibility for the attack.
With no end to the conflict in sight, many of the displaced say they're running out of patience. After trekking for days from the Swat Valley with little more than the clothes they were wearing, they have endured weeks of sweltering heat in cramped tent cities with little sanitation and bare-bones health care. Those lucky enough to get their hands on a donated fan are still waiting for the electricity to power it.
Experts say conditions for displaced residents must be improved soon and the pace of the offensive has to quicken, or the government risks losing the public support needed to sustain momentum against the Taliban. Aftab Sherpao, a former Pakistani interior minister, says the displaced Pashtuns could begin rioting in weeks if the crisis isn't dealt with soon.
"These people have left everything they have," Sherpao said. "If this gets prolonged, there could be a volatile response from refugees, and then support will drop. And if the support isn't there anymore, then we're in trouble."
The Pakistani government and military have been emboldened by a level of public backing not seen before. The difference, experts say, is that people believe the government's resolve to root out Taliban militants is stronger than ever before.
In addition, the military has been able to maintain control of territory after driving out Taliban fighters. Mingora, Swat's largest city, had been seen by many as a crucial test because Taliban militants were braced for combat in an urban environment. Pakistani troops, however, methodically drove militants out of every section of the city, including the infamous town plaza where mutilated corpses were hanged from tree limbs.
Public confidence in the offensive is also bolstered by the fact that, unlike in the past, the country's fractious array of political parties and movements appear to agree on the need for military action against the Taliban. Support from one of Pakistan's most popular politicians, Nawaz Sharif, for the military operation has also helped galvanize public support, said Rasul Baksh Rais, a political analyst in Lahore.
Even among Pashtuns, the main ethnic group in northwest Pakistan, support has grown for the military even as it fights militants who are also Pashtuns. This is largely because of the harshness Taliban rule in areas they controlled. Militants burned down or bombed scores of girls' schools in Swat and carried out public floggings for acts they deemed un-Islamic.
In February, Taliban fighters in Swat agreed to put down their arms if local leaders imposed Sharia, or Islamic law. The Pakistani government acquiesced, hoping the move would bring peace to the region. But soon Taliban militants reneged on the deal, extending their reach into the neighboring district of Buner, upon which Pakistani leaders decided to mount the offensive.