A relative of five youngsters who went missing past January 11, uses a computer as he camps at the public prosecutor's office in Tierra Blanca community, Veracruz State, Mexico, Jan. 25, 2016. ALFREDO ESTRELLA/AFP/Getty Images

MEXICO CITY -- When Manuel Emilio Morato Mungaray started hosting hackathons in Mexico City two years ago, he wanted to persuade a generation of Mexican entrepreneurs that they could be the next Mark Zuckerberg. He put housewives, high school students, business majors and hipsters in the same room and started a dialogue about product design and solving problems by thinking of solutions others hadn’t tried.

His students included some of Mexico’s smartest tech nerds from the best colleges in Latin America. But his biggest challenge, he said, was convincing them that creating the next Facebook, Twitter, Amazon or Google was within their reach.

“Mexico, in my opinion, is a very traditionalist country, it’s a country that is very rooted in the past,” Morato Mungaray, 28, said. "They don’t have access to the mind frame of Silicon Valley where it’s like, oh, I can conquer the world. Here, people say, ‘No, I can never be a Mark Zuckerberg’ and when they come to us, we say, ‘Of course you can.’”

Tech leaders in recent years have hailed Mexico City as one of the most dynamic startup scenes in Latin America, with hundreds of successful entrepreneurs and prestigious universities producing 130,000 engineers per year, more than Canada, Brazil or even Germany. Investors from California have begun to notice, taking meetings in Mexico with startups hoping to change how Mexicans shop, eat and manage their businesses. But even as a growing tech scene spreads across Mexico City’s trendiest neighborhoods in coffee shops and mescal bars brimming with educated young people, Mexico’s tech leaders have struggled to attract serious investors and persuade its best developers to stay put.

"There’s this notion that success comes from going to the United States or going to Europe," said Morato Mungaray, who started the hacking school Dev. F in 2014 to grow Mexico City's fledging tech scene. "Many people say, 'I don’t want to stay here in Mexico, I want to go to California and make a salary in dollars and get rich."

Mexico's tech scene has many factors working in its favor. In a nation where half the population is under 20 years old, university enrollment has tripled in 30 years to almost 3 million students, while Mexico has become a top producer of raw engineering talent. The country also enjoys a long-established business culture and a $1.3 trillion economy poised to soon become the worth's fifth largest. Looking to cash in, the Mexican government distributed $658 million in 2014 to an estimated 620,000 entrepreneurs, resulting in 6,000 new companies and 73,000 new jobs, according to government statistics. The push saw 45 venture capital funds registered in Mexico last year, up from only 14 funds in 2012.

But raising more than $500,000 in funding remains difficult for many Mexican entrepreneurs who complain of widespread corruption and competition from the United States.

Ana Isabel Orvañanos received her masters in economics in Spain and had returned home to Mexico to work in finance when she and a few friends decided to create a platform that would make it easier for Mexico City residents to find good housekeepers and for housekeepers to find jobs in convenient locations. The on-demand house-cleaning site, called Aliada, is often cited as one of the most successful startups in Mexico City, but Orvañanos said the company has fought hard to raise venture funding and hire developers to make its vision a reality.

When they started the company in September 2014, they had a simple webpage and largely operated on Microsoft Excel. Now they work with 300 allies, as they call the cleaning staff, and more than 1,000 households across Mexico City. They expect to expand to other cities across Mexico in December — if they can make some new hires.

"It's still very difficult in Mexico to have a developer really, really loyal to your mission especially because competition in the U.S. is superstrong," she said. "We already had two developers that were with us and they were super big and they had offers from the U.S., where the salaries are way higher, so they went there. That's the big problem in Mexico."

With over 22 million people, Mexico City is one of the world's largest cities. The tech scene has sprouted in the youthful neighborhoods in recent years of Polanco, Roma and Condesa, where it's just as easy to find a Nobu restaurant as a traditional cantina bar with mariachi singers and $2 tequila shots.

Santiago Zavala started organizing hackathons in Mexico City a decade ago and eventually partnered with Silicon Valley entrepreneur David Weekly to found Mexican.vC to connect other entrepreneurs with investors. He created a fund with $20,000 and invested in 10 companies that he presented to venture capitalists in Silicon Valley. He said five still exist and one recently sold for thousands of dollars. But despite his growing success, finding new investors remains a struggle.

"Investors everywhere in the world, not just Silicon Valley, like to invest in things they know, and a lot of investors in Silicon Valley, they don’t know Mexico City. It's not that they don't like Mexico City, it's just they don’t know how things work here," said Zavala, partner and co-founder of 500 Startups, a Mexico City-based network of startups, tech entrepreneurs and investors.

When he makes the pitch, he flies in mentors from Silicon Valley and New York and points out how short the flight is compared with traveling to Brazil, Mexico's biggest economic competitor in Latin America. He ticks off the names of global companies with a big presence in Mexico City, including IBM and Coca-Cola. He also highlights how cheap it is to do business in Mexico, the most populous Spanish-speaking country in the world.

"Every dollar you're investing here, you're buying three, four times the runway than if you are investing in other places because of a strong dollar, the average payroll here is very different than the average startup in Silicon Valley," he said.

Retail giant Amazon launched a dressed-down version of its e-commerce empire in Mexico in June 2015, allowing Mexican customers to buy millions of items for delivery. The company had previously only offered Kindle devices and e-books south of the border. The launch was widely considered the start of a new era for tech companies in Mexico.

"Amazon entering the Mexican market, that tells me they saw something that others haven’t seen before," said Fernando Fabre of Endeavor Mexico, a nonprofit based in New York City that promotes entrepreneurship in emerging and growth markets around the world.

Endeavor works with 98 startups in Mexico that have grown at a steady rate comparable to the hundreds of other companies it mentors throughout the world. The companies grew their workforces by 23 percent in 2011, resulting in an additional 63 new jobs per company, the second-largest average growth among the 13 countries in which Endeavor operates. But Mexican companies have still performed below their foreign counterparts. In one case, a food delivery app in Mexico sold for $3 million, while a similar company in Turkey saw a $600 million sale, Fabre said.

"Most tech companies can trace their success to three or four major companies, the Netscape, Paypal, Google mafias. They become really successful and then invest in next generation," he said.

But that hasn't happened yet in Mexico, a country plagued by high rates of violence and poverty, Fabre said. There are still no unicorns, or private startup companies with $1 billion valuations or higher.

"What they need is to have two, three success stories and make sure those teams stay and become the role models and the investors of the next generation, and unfortunately what has happened in the emerging world is that any success story that happens, they disappear. They don’t want to talk to the media, they don’t want to get kidnapped, or they buy a condo in Miami or New York and you never hear from them again," he said.

The companies that do remain in Mexico are often operating on too small a scale to attract investors, Fabre said. "They want global companies. No one wants Mexican companies. It’s easy to say, 'I'm going to create the Uber for Mexico.' Well, investors don’t want that," he said.

But the tech world is rife with stories of humble beginnings, like Zuckerberg plugging away in his Harvard dorm room. For many Mexican entrepreneurs, thinking small is better than giving up.

Two years ago, a group of startup geeks were drinking in a Mexico City bar, lamenting that all anyone in the scene wanted to talk about was successes, when the world of business is built on failures. Talking out what went wrong was crucial to making sure next time it would go better, they decided. They began hosting monthly meetings in Mexico City called "F--- Up Nights," where entrepreneurs could share their missteps. These days, there are F--- Up Nights events held in 100 cities across the world in almost every continent. At a recent gathering in Mexico City, the sold-out event had to turn away people at the door eager to hear business leaders discuss their failures.

"It's not that we want to teach people about failure," said Yannick Kwik, the organization's spokesman. "We are a little bored with success stories everywhere, especially when most companies fail."

Kwik moved from his native Spain last year to help F--- Up Nights expand to new countries. He said many people are surprised to learn the event started in Mexico City or that Mexico City even has a tech scene. "I didn’t know there was such a thick business startup scene in Mexico," he said. "People give everything for everyone and they do the same thing for their companies. Everyone helps each other a lot here, and that makes it super easy for a startup to get your name out there because everyone knows each other and everyone is willing to help."

Andy Kieffer didn't speak a word of Spanish and had no friends or family in Mexico when he decided to abandon the startup scene in California's Bay Area and move from San Francisco to Guadalajara to build Silicon Valley-style, rapid-growth startups. Kieffer is a general partner at Agave Lab Ventures, a seed-stage venture capital fund that targets large, existing Mexican markets that have underinvested in technology in the past and are now playing catch up.

"It's like the fifth biggest economy in the world, but from a technology perspective its still 1972," he said. "Most of the advertising is still yellow pages and people driving by in cars with bullhorns, like Stone Age stuff."

Mexico's tech leaders face two major challenges, he said. First, they have to stop trying to copy Silicon Valley. Secondly, tech leaders have to figure out how to nurture a culture of innovation in a country where people are reluctant to stand out.

"The only way this happens is that Mexico needs to stop trying to be Silicon Valley," he said. "It's not. There are not two cultures that are further apart. Failing in Silicon Valley is considered almost as good as succeeding. Here, failing is just failing."

Mexican GDP Growth Over Time | FindTheData

Daniel Rojas started Rocket, a money-management site, in Mexico City in 2007, building it to an international company with more than 30,000 employees active in 110 countries across six continents. Investors who arrive in Mexico City sniffing around for fresh talent to help create cheaper versions of existing startups and make a quick buck have hurt the scene, he said.

"They are copycats that don't work in the Mexican economy and they steal Mexican talent," he said. "For there to be unicorns, you have to have the best human capital, not good, but the best."

Some Mexican tech leaders said they are already looking to convince a new generation of developers and entrepreneurs to stay home by showcasing what Mexico could become. At iLab Veracruz, a technology startup incubator in Xalapa, Mexico, roughly 180 miles outside of Mexico City, tech leaders trained in the U.S. are returning to the homeland to teach technology startup ideas to Mexican college students. The incubator holds three, 16-week boot camps a year for 23-to-25-year-olds from across the country.

"Our goal is that they become the entrepreneurs, that they see the possibility of creating their own business, or going to work for a business that already exists." said Alhely Almazán Morales, iLab's chief innovation officer who received a master's degree in system design and management from MIT in Massachusetts. "One of the advantages is that the young people have a unique way of thinking. They are empowered. They see they can be creative as young people in any other country."

Heberto Taracena is one of Mexico's few success stories. The graduate of the Kennedy School of Government at Harvard founded Metros Cúbicos, Mexico's leading property portal, before selling it for a wide margin in 2007 to Time Inc. He's used his earnings to invest in other Mexican startups.

"We need more sources of direct inspiration, success stories," he said. "One single story coming from 2000 is not enough. We need success stories from this time."

Taracena said tech leaders have to make the world take Mexico City seriously. "We are going to see young people becoming really rich, really successful and then making their own funds and investing in the system all over again," he said.

But for Morato Mungaray, Mexico is in need of more than loyal developers. The startup scene represents a budding cultural revolution, he said. "We are sick of all these things like corruption and the old ways of doing business. It's very paternalistic. It's all about who you know and it doesn’t lead to equality, it leads to more wealth for the people who are very connected," he said.

Mexico's tech scene is "a lot of young people who are deciding in a very strong way to do things their own way," he said.