If you ever visit Helena, Montana, you will see a lot of what you would see in other state capitals.

There is a capital dome on a hill overlooking the rest of the city. It’s hard to drive very far without seeing the headquarters of some branch of state government, and it seems like every third tenant in the city’s office complexes is a trade association or lobbying group. Unlike in other state capitals, though, you won’t see a lot of people in Helena.

With a population of slightly more than 31,000, Helena is one of the country’s smallest state capitals. It’s not surprising, given that the entire state of Montana is home to only 1 million people. In addition to being tiny, Helena is also incredibly remote. The closest large metropolitan areas are Salt Lake City and Seattle, which are both nearly 500 miles away.

Helena: tiny, remote, and hard to get to.

Those qualities shouldn’t make Helena a candidate to house a large engineering team for one of Silicon Valley’s most valuable unicorns. However, SoFi, the online personal finance company focusing on student loans, mortgages, and personal loans, has multiple locations in the city that together house roughly 140 employees — many of them programmers and engineers, as I learned on a trip last month to Helena.

SoFi was valued at $4.4 billion during a February 2017 round of fundraising before seeking an $8 billion valuation in failed merger talks later that year. In other words, despite the company’s well-documented leadership struggles, they are a pretty big deal. How does a startup that’s a big deal in Silicon Valley end up in a tiny town?

In this instance, by accident.

According to the Helena Independent Record, SoFi hired two employees of the Student Assistance Foundation, a Helena-based nonprofit, as independent contractors. Both employees — proud Montana residents — had no interest in moving to Silicon Valley. Recognizing that not all the talent in the country lives (or wants to live) in the Bay Area, SoFi hired the contractors as early-stage employees and began building a team of programmers and engineers in Helena.

“It’s been an amazing opportunity to be able to grow something like this in a small town. We feel incredibly fortunate to have a strong presence here in this community, an environment in which we can hire some of the best and brightest engineering talent,” SoFi VP of engineering David Thompson said in an emailed statement.

This is the sort of accident economic developers dream of. An influx of highly skilled, well-paid, ambitious technical talent into a city whose population would fill less than half of most NFL stadiums just doesn’t happen often, if ever.

Local leaders recognized the opportunity in front of them. Over a few days in January, the Montana Business Assistance Connection (MBAC) hosted what executive director Brian Obert dubbed a “Creativity Crawl,” where local entrepreneurs, city officials, and staffers from Governor Steve Bullock’s office visited the city’s two fledging coworking spaces, the SoFi offices, Helena College, and Carroll College to discuss ways to build on the startup momentum that began when SoFi came to town. Part of those plans include increased engagement with the city’s coworking spaces and an active effort to market Helena and the surrounding region to other startups looking to locate operational or engineering teams outside of Silicon Valley.

Along with my wife, Megan McKissen (the director of OPO Startups in St. Charles, Missouri), I was lucky enough to get invited to Helena to share our experience building a startup ecosystem in a relatively out-of-the-way location.

The discussion occurring in communities like Helena is exciting — while still being realistic. No one in Helena believes the city will one day rival San Jose as a startup hub.

According to Obert, selling the region to other startups should be a lot easier with SoFi’s engineers already living (and loving) that life. Some of the engineers and programmers working at SoFi are also likely to have their own side hustles and dreams of entrepreneurship. Over time, Obert hopes that some of these aspiring entrepreneurs become just that.

Many — if not most — Heartland startup ecosystems take the approach of “build it and they will come.”

If you build an ecosystem the right way, that approach can work. The ecosystem I work in in St. Charles, Missouri, followed that path, and nearly three years later we have a startup that is on the fast track to hire its first 100 employees by the end of 2018.

In Helena, things are happening in a different way. Montana’s tiny, rural, remote capital is building an ecosystem around a multibillion-dollar startup that unexpectedly showed up on their doorstep.

Dustin McKissen is an economic development executive in the greater St. Louis area, a LinkedIn Top Voice on Management and Culture, a CNBC contributor, and an Inc. columnist.