In early August, when leaders of several dozen Muslim countries gathered in Jakarta for an annual economic conference, some of the speakers acknowledged that things aren't looking good for their global community. Chaos continues to grip their heartland in the Middle East, they noted, and anti-Muslim politicians are drawing unprecedented support in Europe, the United States and elsewhere.

When Indonesian President Joko Widodo spoke, however, the World Islamic Economic Forum's host offered a bracing dose of optimism.

Citing data from a landmark 2015 Pew study showing that the number of Muslims worldwide is expected to grow by 73 percent from 2010 to 2050, the head of the world's most-populous Muslim-majority nation told his counterparts that their countries must seek to leverage their "fundamental strength": a huge and expanding youth population.

"Muslim societies have the best demographics of any demographic group in the world, with the highest proportion of young people," he said.

According to Pew, Muslims are expected to outnumber Christians by about 2070.

The data Widodo cited was sound; demographers largely consider the Pew study's forecasts reasonable. But his main contention - that the Muslim world's comparative youthfulness and high fertility rate represent a strength - is a matter of debate among economists, and his assertion last month sparked discussion in Indonesia and beyond about how much youth is too much.

The "youth bulge," seen when infant mortality drops while fertility rates remain high, can indeed boost economies by increasing the number of people available to work, experts agree. But it also can lead to social instability if the masses of working-age youths are unable to find productive jobs.

"The youth bulge can be both a gift and a curse," said Ragui Assaad, a professor who specializes in labor economics at the University of Minnesota's Humphrey School of Public Affairs. "You either generate good jobs or a lot of people fall into unemployment, creating the possibility for unrest and frustration."

The Muslim world, of course, is unlikely to swing in just one direction, as every Muslim-majority country faces particular economic and social circumstances that will affect whether it can productively integrate its youths. A handful of Muslim countries, such as Iran and Malaysia, have implemented strong birth-control policies to lower their birthrates to below-replacement levels, lessening the challenges facing young job seekers.

Still, the overall trend is of a global Muslim community that has lowered its birthrate at a much slower pace than the rest of the world, according to Pew senior demographer Conrad Hackett.

"That Muslims are growing twice as fast as the world's population is really striking and remarkable," he said.

When young people lack economic opportunities and the prospect of being able to support families of their own, experts say, they are especially susceptible to the lure of anti-establishment ideology. In Latin America in the 1970s and 1980s, when countries in the region were experiencing youth bulges, that draw was often Marxism, Assaad noted. But it could take the form of austere varieties of Islam for disgruntled Muslim youths today.

Egypt, Tunisia and Syria during the Arab Spring - when restive youth-led movements challenged (and in the first two cases, toppled) the ruling order - are taken as recent textbook cases of the link.

Assaad suggested there is a connection between the recent drop-off in political violence in Latin America and demographic changes. "Now the last rebel group movement is declaring peace," he said, alluding to Colombia's FARC. "Latin America basically crossed its youth-bulge period some time back, so it does have less of a risk factor" now.

Richard Cincotta, a political demographer at the bipartisan Stimson Center who advises the National Intelligence Council on how demographic trends influence the geopolitical landscape, also acknowledged the appeal of radical, often violent, groups to disaffected youths.

"You can't just generalize to say all these young guys will become terrorists or something," he said. "But you can say they are available, and vulnerable, and they are in a part of their life where you want to impress your friends when you're ideologically naive, and you're searching for an identity that [the groups] are good at providing."

Another reason experts are wary of Widodo's optimism about soaring Muslim population numbers is that advances in technology and automation appear to be removing jobs from economies faster than they are adding them - which only exacerbates the problem of youth employment.

"There's always been a neoclassic assumption [that] economy needs labor, [that] labor and economic growth go together," Cincotta said. "Now they're becoming disassembled."

In Widodo's Indonesia, which is currently seeing a "youth bulge," concern is growing that the generally poor quality of public education, combined with the effects of a sky-high youth smoking rate, will make it hard for the country to capitalize on the surfeit of young people in the way the president envisaged.

"There is a trade-off between quality and quantity," said Aris Ananta, a professor of demography at the University of Indonesia. "Indonesia still needs to raise productivity and improve education and health."

Shadi Hamid, a senior fellow at the Brookings Institution, says Muslim leaders' pride in their faith's population surge is not only about economics.

"There's a sense that Islam has a vitality that other religions don't," he said. "It could be that this significant increase in population could be a negative thing economically for the Muslim world, but some Muslims might be proud of that fact irrespective of the economic outcome."

The one thing demographers are clear about is that demography is not economic destiny, either way.

"As an academic, I will say the president is half right and half wrong," said Assaad. "It is called window of opportunity, not demographic gift. You can make use of it if you can grow fast and develop jobs. But that has not materialized in the Middle East, and for Africa it's still an open question."