The Philippines’ beauty queen mill is a ticket to a better life for many poor and working-class young women–but it is also a graveyard of dashed dreams, with only a small fraction ever getting to wear a coveted crown.

Pia Wurtzbach may have to accept that she will always be remembered as the Miss Universe who nearly never was, after show host Steve Harvey made the biggest boo-boo in pageant history when he wrongly announced the winner as Miss Colombia last month.

But there has hardly been any dispute over whether the 26-year-old Miss Philippines deserved the title. The poise, beauty and confidence she exuded, and which won the judges over, were the fruits of three years of training in one beauty-queen boot camp after another.

Filipinos can name their beauty queens as easily as Brazilians remember their football legends.

And all over the country, beauty-queen boot camps–formal and informal–have helped turn the country into a superpower in the beauty pageant world; probably anachronistic in this day and age of political correctness, yet surprisingly enduring.

Inside a compound in the heart of Manila’s most populous district in Quezon City, dozens of tall, lithe, young women gather under a high, curved iron roof covering a basketball court that for now serves as a dance studio. A wall of mirrors stands at one end. At the other end are the dressing rooms and in between is a smattering of plastic chairs and tables where a couple of women are busy applying make-up and fixing their hair.

It is hot, especially around noon, even in January when it is supposed to be cooler than in December. Four industrial fans keep the air circulating. Most of the women are on the floor, perspiring in their seven-inch heels, bikini tops and gym shorts.

They are doing the “duck walk”, lunging as they swing their hips as far as they can, left to right, left to right. Before the day ends, usually near midnight, they would have walked like this 25 times around a rectangular room measuring 25m long by 15m wide.

All of them have already spent the entire morning at the gym.

When not duck-walking, they stand in front of the mirror, drawing big circles with their hands, and stretching their limbs. Again, they bend down and swing their hips, left to right, front to back.

Later, there will be more lessons: how to stand and smile; how to look sexy and sweet; how to handle the mishap of tripping on stage; how to quickly answer questions as mundane as, “What makes red better than blue?”

They go through these drills for at least nine hours every day–excluding time spent at the gym–with some weekend breaks, for six months. At the end of it all–the cherry on top–is a three-hour pageant that the women hope will turn them from just another pretty face in a crowd into a local legend.

The man who runs this particular camp in Manila is Rodgil Flores, 49, one of the Philippines’ top “queen-makers.”

Five of his wards have already clinched international titles: Miss International Lara Quigaman (2005) and Bea Rose Santiago (2013); and Miss Earth Karla Henry (2008), Jamie Herrell (2014) and Angelia Ong (2015).

Flores and his team, Kagandahang Flores (The Flores Beauty), do it pro bono. Instead, they make their living handling events. They do not get a cut from their wards’ prize money, endorsement deals, paid public appearances, or TV and movie contracts. “We work hard to train them. If they win, that’s the bonus we get,” he said.

The women who go to him say they too are not in it for the money. They do it for the prestige of wearing a crown, they insist. And because it is a crown, they concede that not everyone can wear one.

About 100 women pound their heels on Mr Flores’ studio floor each year, but only 30 will emerge as serious contenders and maybe one will be queen–on the local or international stage–by the end of the year. Most likely, there will be a couple of finalists.

Many of the women start at 18, and then top out and move on to other things when they reach 26. Most are poor or working class and, because of the gifts nature has endowed them with, are usually their families’ ticket to a better life.

Janicel Lubina was working as a maid when a talent scout spotted her. She was just 16 then. She made the rounds at beauty pageants in Palawan province, 750km south of the capital, Manila.

When she turned 18, she was sent to Flores’ boot camp.

“I remember her well because when she came to me, she didn’t even have a bag. All her clothes were in plastic bags,” he recalled.

A year later, she won the title Binibining Pilipinas International (Miss Philippines International), which earned her a spot at the Miss International pageant. She was a finalist.

Now 20, Lubina has her pick of modelling and hosting assignments, but she has also gone back to school for a more assured future.

While Flores does not charge for his services, the women have to cover their own expenses such as meals, lodging, transport and make-up. They get free membership at American chain Gold’s Gym, but that is about the only perk they get. A few are lucky enough to have parents willing to bankroll their dreams.

Kiara Giel Gregorio, 19, flew to Manila from London and set aside her studies to be a barrister to chase the crown.

Both her parents are nurses who have lived in Britain for over a decade. They are paying for everything. Gregorio’s mom has even taken time off from work to watch over her while in the Philippines.

But most of the other pageant hopefuls have had to rely on others to survive.

For their families, it is a matter of pride. For their scouts, mentors and sponsors, it is an investment. They most likely will get very little for their money. But if their candidates win, the rewards are huge. They will establish their reputation and manage their winning wards’ lucrative careers.

For the women who do make it, the immediate reward is that their names will be recorded for posterity. A gated community in a city south of Manila has been naming its streets after Filipino beauty queens.

“Once you’re a beauty queen, you will always be remembered as a beauty queen here in the Philippines, even when you’re already old. You keep the title for life, the prestige for life,” said Flores.

Past winners have managed to parlay their crowns into lucrative careers in entertainment. Others marry well.

Gloria Diaz, who in 1969 became the Philippines’ first Miss Universe, has been in over 40 movies since she took up acting in 1974. She is now 64.

Another Miss Universe title holder, Margie Moran, 62, who won in 1973, married the scion of one of the Philippines’ wealthiest families, earned degrees in business management from Boston University and the University of London, and now runs a popular resort in Davao City.

But perhaps the most well-known beauty queen the Philippines has ever had is someone who did not even make it to the major leagues: Imelda Marcos.

Marcos placed second in the 1953 Miss Manila contest. She fell short in the competition, but caught the attention of a rising political star: Mr Ferdinand Marcos.

He went after her and, after 11 days of courtship, they were married. That began a partnership that would hold sway over the lives of millions of Filipinos for three decades.

Marcos went on to become one of the wealthiest women and most recognizable faces in the world, eclipsing even the brightest of beauty queens.

At 86, she still wields a big influence on Philippine politics. Her son, Ferdinand Marcos Jr, is now running to become the nation’s next vice-president.

“Filipinos are always searching for somebody to idolize, hero figures. Beauty queens come as an inspiration for everyone,” said Flores.

“No matter what you do, especially if you’re not that rich or you have encountered many hardships, at the end of the day, you will be heralded as someone who will be an inspiration for everyone.”