Hemmed in by a refinery, LAX and miles of factories and warehouses, El Segundo was once a working-class neighborhood better known for its aroma than its lifestyle.

Today, powered by SpaceX and other high-tech, high-growth companies, it has evolved into an upscale enclave perfectly positioned for some of the region’s hottest businesses.

The South Bay city is building a new narrative, using the warehouses, offices, industrial lots and homes that were part of its deep history in aerospace, oil and defense and catching the next waves of innovation in space, finance, sports and even toys.

SpaceX started in El Segundo and has since spawned more than 100 startups, many in the area. SpaceX alums sometimes call each other “Gundo bros,” after their old stomping ground.

A growing ecosystem of toy designers and manufacturers has emerged around Mattel, which is based in El Segundo. Meanwhile, the region has emerged as a mecca for pro sports, with top basketball and hockey teams building elaborate practice facilities there.

Varda Space Industries has leased an El Segundo plant formerly occupied by toy manufacturer Mattel.

In an expansion of its business processing pharmaceuticals in outer space, Varda Space Industries has leased an El Segundo plant formerly occupied by toy manufacturer Mattel.

(Myung J. Chun / Los Angeles Times)

Krystal Robbins, a 21-year resident of El Segundo, said it has come a long way from the days when some called it Smell Segundo. Air quality has improved, as has the town’s quality of life.

Her family has enjoyed what feels like small-town life while rubbing elbows with big-city players. SpaceX employees and Mattel managers are in the local school’s PTA. Once, the Chargers sponsored a charity event for the El Segundo Education Foundation.

“It always had blue-collar-meets-the-Midwest kind of vibe to it,” she said. “But it is definitely more bougie than it was.”

The oil refinery along the water gave the city its name — Standard Oil named its second refinery in the state El Segundo in 1911. For decades, the city has had an unusual Midwestern vibe for a West Coast location, so it is often used for film and commercial shoots that need a backdrop that looks less like L.A. Its traditional brick high school was recently used for a Kohl’s commercial and in the series “All American.” It was also a location for the movie “Superbad.”

Today, times are good for the city of 17,000 thanks to its big businesses, small-town charm and engaged citizens, Mayor Chris Pimentel told The Times.

“Every civic event is packed to the gills,” he said. “If somebody gets hurt or injured, people show up and cook all your food for you. It is a remarkable spot.

El Segundo has put business pragmatists in city leadership positions to guide the city out of its former insularity when locals guarded its small-town identity as “Mayberry by the Sea,” said Alex Rose, head of development for one of the city’s largest commercial landlords, Continental Development.

During the Cold War buildup of defense that ended with the collapse of the Soviet Union in 1991, El Segundo was controlled by “longtime residents who were very, very protective of the status quo,” Rose said.

In the early 2000s, newcomers with business-forward perspectives took power on the city commissions and shifted public policy, he said. Recognizing that the vast majority of the city budget came from business fees instead of property taxes, they set out to make it a better place to do business.

Unlike most cities, including Los Angeles, El Segundo has no gross receipts tax on businesses and relies instead on annual fees based on business size.

The city has tried to spend more than other cities on the local infrastructure it controls, its mayor said.

“We over-invest in the sort of infrastructure that makes people feel good about being here,” Pimentel said. “The street lights are synced. The roads are paved. The response times on police and fire are both under three minutes.”

One of the big recent debates in El Segundo is stop signs. Some residents wanted more to slow traffic. One even went to jail for installing an unauthorized sign. To address concerns, the city has added flashing lights to the rims of its stop signs over the years.

An LED-assisted stop sign in El Segundo.

An LED-assisted stop sign in El Segundo.

(Eric Thayer / Los Angeles Times)

“People always want more stop signs,” Pimentel said.

On the busy thoroughfare of Rosecrans Boulevard, offices are seeing an influx of white-collar service firms full of lawyers, accountants and bankers.

El Segundo offices often started as outposts, but many have become bigger than downtown counterparts as workers have fled downtown, said Jason Fine, a real estate broker at JLL.

“The spoke is outgrowing the hub,” he said.

Among the firms on the Rosecrans corridor are big accountants KPMG and Deloitte, and real estate companies Trammell Crow Co. and Prologis. El Segundo is also home to several wealth management firms serving clients in the South Bay.

People ride bikes past businesses.

People ride bikes past businesses.

(Eric Thayer / Los Angeles Times)

“Being here helps us stay closer to them while giving our people more flexibility across the Los Angeles area,” said Michelle Wroan, managing partner of KPMG Los Angeles. which announced last year that it would have offices in downtown L.A. and El Segundo.

The fact that El Segundo is minutes from Los Angeles International Airport makes it “a practical location for our professionals who spend a lot of time on the road working with clients,” she said.

As aerospace has scaled back since the end of the Cold War, El Segundo has emerged as a hub for many creative businesses, including toys.

“El Segundo represents the greatest concentration of toy manufacturers in the U.S.,” Toy Assn. President Greg Ahearn said last year at the opening of the Toy Building tower of showrooms for the trade near Mattel’s El Segundo headquarters.

Ad agency Innocean USA, which creates advertising for Hyundai and others, just agreed to move its U.S. headquarters to El Segundo in one of the largest leases of the year in the South Bay.

“El Segundo is just such a thriving environment,” President Leslie Barrett said.

Biotech billionaire Dr. Patrick Soon-Shiong, owner of the Los Angeles Times, also has a significant presence in the city.

El Segundo has also drawn the interest of L.A. pro sports teams, which have practice facilities and offices there. The Lakers and Kings train in El Segundo, and the Sparks are building a $150-million headquarters and practice facility set to open next year.

The Bolt, the Chargers' training facility.

The Bolt, the Chargers’ training facility.

(Eric Thayer / Los Angeles Times)

The Chargers built their $250-million headquarters and training facility on a site that was once part of a sprawling campus operated by defense contractor Raytheon Technologies Corp.

Also coming to land on the former aerospace campus is a massive $175-million artificial surf park planned by a company tied to billionaire Vinny Smith’s Toba Capital.

The area remains a center for innovation in space and military technology, including SpaceX alums such as Varda Industries, which processes pharmaceuticals in space orbit and has grown large enough to take over a large El Segundo plant where toy manufacturer Mattel used to design Hot Wheels and Barbie dolls.

Other El Segundo companies founded by former SpaceX engineers include nuclear reactor maker Radiant, fishing robot maker Shinkei Systems and waste biomass energy startup Arbor.

El Segundo’s growth boom, led by spinoffs from SpaceX and other tech companies, is the second round of reinvention in recent memory, Rose said.

A water tower in El Segundo.

A water tower in El Segundo.

(Eric Thayer / Los Angeles Times)

“There was definitely a long reset,” he said, as laid-off engineers built their new companies.

Many locals have embraced the growing sophistication of their home. Over the years, the city’s dining options have been upgraded with better restaurants and microbreweries like Sugar Monkey Brewing. Last year, Barsha Wine Bar & Shop opened in the city.

Apartment renters are embracing El Segundo, where vacancy is 3.4%, about half of what it is in L.A., and rents are rising faster, real estate data provider CoStar said. Office vacancy is lower than in Los Angeles, even though average rents are higher.

Residents have watched property values and the profile of El Segundo rise. Though the smell that it was once known for does reappear on occasion.