Bangladesh’s population of 160 million is as big as France, Germany, and the Netherlands combined. The country is also easily the poorest of the world’s 10 most populous. Given its size and the depth of its poverty, the country’s recent economic boom must rank as one of the world’s happiest economic stories right now.

According to the Asian Development Bank, Bangladesh’s economy grew by 7.1% in 2016, the fastest expansion in 30 years. It was also the sixth year in a row that GDP growth was greater than 6%. Most analysts expect this run to continue. Ratings firm Moody’s, for example, says the country’s growth is likely to remain “robust.”

Bangladesh’s rapid growth wouldn’t be so exciting if it didn’t reach the poor. A recent World Bank report (pdf) found that between 2005 and 2010, average incomes for the poorest 40% of households grew 0.5% faster than for the country as a whole. By comparison, in India the poorest 40% of households did worse than the national average over a similar period.

As a result of this inclusive growth, poverty rates have plummeted. In 1991, well over 40% of the population lived in extreme poverty. Today, the World Bank says that less than 14% still does. That is, about 50 million fewer Bangladeshis are in extreme poverty as a result of the improving economy.

Yale economist Ahmed Mushfiq says Bangladesh’s recent success can be attributed to two major factors: the flourishing garment manufacturing industry and the country’s robust NGO sector.

In 2015, Bangladesh exported over $26 billion in clothing, second only to China. Clothing exports make up almost 14% of the GDP and 80% of all exports. Estimates suggest the the garment sector grew by over 10% in 2016.

Mushfiq says the industry thrives in spite of Bangladesh’s poor infrastructure and difficult regulatory conditions due to an accident of history. Bangladesh was the beneficiary of a textile quota system imposed by the US in the 1970s to protect local companies against competition from the growing South Korean garment industry. To get around the quota, Korean manufacturers set up shop in Bangladesh. The Bangladeshi business community picked up technical expertise from this setup and has since started its own companies.

Mushfiq credits Bangladesh’s success in poverty reduction and health to the country’s high-performing NGOs. Historically, the country has had a powerful civil society that runs much of its education and health services. Mushfiq says the sector acts like a parallel government. BRAC, the world’s largest NGO, started in Bangladesh, and claims to have provided over 60 million Bangladeshis with access to toilets. The country’s NGOs are also likely the reason it outperforms its richer neighbor India on human development indicators like gender equality and life expectancy.

Of course, not all is well. Democracy is under threat as the ruling Awami League Party tilts in an increasingly authoritarian direction. A lack of public infrastructure investment holds down growth, and has made Dhaka, the crowded capital of 15 million people, a perennial contender for the title of the world’s least liveable city.

Mushfiq’s biggest concern is a repeat of the Rana Plaza disaster, in which a garment factory outside of Dhaka collapsed in 2013 and killed over 1,100 workers. Worker safety must be a top priority of the government, he says, not just for the sake of saving lives but also to make sure that the industry avoids international boycotts over working conditions, which would devastate the economy.