KABUL, Afghanistan - Abdul Wahid, one of 10 children of an electrician, had little education beyond a few years in an Islamic religious school. There, his lessons consisted of memorizing every verse of the Quran.
When he finished school, he had no prospects for a steady job in rural Wardak province. He tried to make a living as a long-distance driver for hire, using a borrowed car. He often had to wait a month between customers.
At 18, he found employment of another kind.
"My life got better," he said, "when I joined the Taliban."
He and his fellow militants ambushed foreign supply trucks or military vehicles, then divvied up the food, blankets and other spoils.
"All of the work I was doing made my heart happy," said Wahid, 26, sitting cross-legged on the concrete floor of Pul-e-Charkhi Prison on the outskirts of Kabul, the capital. "I don't know how to use tools. I'm not very skilled. So for us, whatever we reaped from attacks, we would keep. It was enough for us to live on."
In many developing countries, runaway population growth has created vast ranks of restless young men like Wahid, with few prospects and little to lose.
Their frustrated ambitions can be an explosive force, as shown by the youth-driven uprisings that toppled autocratic regimes in Egypt, Libya and Tunisia in 2011.
Taliban offers work
About 80 percent of the world's civil conflicts since the 1970s have occurred in countries with young, fast-growing populations, known as youth bulges, according to an analysis by the nonprofit Population Action International.
Afghanistan is a stark example. Since the U.S.-led invasion in 2001, the population has swelled from 23 million to 33 million. Nearly three-fourths of Afghans are under 30. The median age is 16.6, compared with 37 in the United States.
In a sluggish agrarian economy, few young men can find legitimate employment. Their lack of a steady income essentially closes the door to marriage in a society where sex outside of wedlock is forbidden. Tradition requires paying a dowry and staging a wedding celebration, which together cost as much as $5,000 - three times the average annual household income.
A young man can earn far more working for the Taliban than for the Afghan army or the police, according to Western intelligence reports and researchers. Planting a roadside bomb can pay 20 times more than a day's manual labor.
Similar youth bulges have emerged in Iraq, Pakistan, Yemen, Sudan, Somalia and the Palestinian territories - part of what security experts call an "arc of instability" reaching across Africa, the Middle East and South Asia.
Of the 2 billion or more people who will be added to the planet by 2050, 97 percent are expected to be born in Africa, Asia and Latin America, led by the poorest, most volatile countries.
"We are literally going to see 1 billion young people come into the populations in the arc of instability over the next two decades," said Jack Goldstone, an expert on demography and revolutions at George Mason University in Virginia. "We can't fight them. We have to figure a better way to help them."
Youth bulges in history
A large youth population does not automatically result in violence. Religious and ethnic friction, political rivalries, economic disparities or food shortages can provide the spark. Mobs of unemployed young men provide the kindling.
A youth boom contributed to the rise of the Nazis in 1930s Germany and to Japan's military ambitions in the Pacific.
More recently, demonstrators crushed in the 1989 Tiananmen Square protests in China were part of a generational bulge, as were young activists and rioters in the U.S. in the 1960s and '70s.
In 1974, U.S. national security adviser Henry Kissinger warned in a then-classified memo that the growing numbers of young people in the developing world were likely to be more "volatile, unstable, prone to extremes, alienation and violence than older populations."
"It is urgent that measures to reduce fertility be started," he wrote.
Yet for many years afterward, the growing ranks of youthful militants in distant lands were not widely seen as a major threat to America's security.
That changed on Sept. 11, 2001.
The bipartisan commission that investigated the suicide hijackings, carried out by 19 young Arab men, said one factor in the rise of extremism in the Muslim world was "a large, steadily increasing population of young men without any reasonable expectation of suitable or steady employment - a sure prescription for social turbulence."
The CIA and other intelligence and defense agencies now seek the advice of demographers as well as weapons analysts and counterinsurgency experts.
In planning documents, the Pentagon and the National Intelligence Council warn of a looming "demographic crisis" in parts of Africa and Asia, where rapid population growth and climate-related disasters could help trigger famines, wars and revolutions.
In Afghanistan, site of America's longest war, family planning is not likely to be on the nation's agenda after U.S. and NATO forces depart. The country has a birthrate of nearly seven children per woman, one of the highest in the world.
Continued rapid population growth will add to Afghanistan's chaos, said political demographer Richard Cincotta, who advises the U.S. defense and intelligence establishments.
"I don't see any relief," he said. "It's too hard to employ this many people and too easy to recruit them into violence.
"Two decades from now," he added, "the population will be nearly double."
Researchers who went into Afghan towns and villages seeking a deeper understanding of attitudes toward the Taliban heard many similar stories.
The nonprofit International Council on Security and Development interviewed more than 420 men in Helmand and neighboring Kandahar provinces in 2010.
Participants in the survey were asked, "Why do you think other Afghan men join the Taliban?" The leading reason, cited by 57 percent, was "jobs or money."
The desire to wage jihad ranked a close second.
Raising women's status
Rapid population growth in Afghanistan stems in part from the inferior status of women, who have little control over how many children they bear.
By tradition, girls marry young, to men chosen by their parents, and can be jailed for resisting suitors or leaving their husbands.
Around the world, raising the education level of women has been associated with lower birthrates. Women often postpone marriage and childbirth while in school and gain more influence in family decisions. Yet the Taliban and many tradition-bound men oppose sending Afghan girls to class. Militants have bombed schools and attacked or poisoned teachers and schoolgirls.
Although access to education for girls has improved since U.S.-led forces toppled the Taliban regime in 2001, fewer than half attend school, by some estimates.
Obaida Rahmati, a girl with large brown eyes and a shy smile, dreamed of going to school and becoming a pilot. The planes in the sky seemed to offer freedom she didn't have at home.
When she was 9, her heroin-addicted father sold her to a neighbor, who planned to marry her as soon as she turned 12. The price: $400. For three years, she lived as a servant in the man's house, washing clothes and hauling stones.
Just before they were to be married, she was rescued. Her older sister arranged for a sympathetic police officer and employees of a girls shelter to show up unannounced and demand her release.
Now 12, Obaida lives and studies at the shelter, operated by the nonprofit Women for Afghan Women, which has full-time guards and no identifying signs.
"There are lots of Obaidas out there," said Manizha Naderi, the shelter's director.