Under Armour employees in Baltimore sew some of the company’s products in July. The firm recently laid off 280 workers and last week reported its second quarterly loss in a row. (Sarah L. Voisin/The Washington Post)

Under Armour is the rare company that managed to turn a marketing slogan into a schoolyard chant: “We must protect this house” first surfaced in a 2003 television ad that ran a few years before the company’s Wall Street debut.

“We started this thing, and now we’re on top. Everybody’s trying to knock us off,” a football player barks in the ad, challenging his squad before a big game.

Under Armour rode that campaign to become the third-largest sportswear brand, behind Nike and Adidas, but today it is having a hard time living up to its own rallying cry.

It faces fierce price competition from larger rivals, and changing consumer preferences have sent its shoppers online and into the arms of a bevy of new contenders. Investors have taken note, sending the stock down 36 percent year-to-date.

The resulting tumult has led to the biggest challenge yet for founder Kevin Plank, a University of Maryland alum.

With its tightfitting apparel, Under Armour came to prominence in the 2000s — too recently to seize on consumers’ ’90s nostalgia. (Doug Kapustin for The Washington Post)

As sales growth has slowed — the Baltimore-based company reported its second quarterly loss in a row last week — Plank has brought in fresh leadership and laid off 280 employees in search of a new direction.

Under Armour’s executives cast the company as a victim of its own success, a still-ascendant titan of retail that now must pivot to stay profitable.

“We’re admittedly making less money, but we’re using that money to invest in our business,” Plank said in a conference call last week with investors. He later added: “The terrain has changed, and so must we.”

The brand catapulted to prominence in the mid-2000s with sleek, tightfitting “performance” apparel that was a hit with young and professional athletes alike, despite its higher price tags. The company’s testosterone-heavy marketing campaigns carried it to a successful initial public offering in 2005, and it spent the intervening years building out a diversified product line.

The firm dared to challenge Nike in the market for high-end basketball shoes, netting an endorsement from Stephen Curry at the height of his popularity.

Rivals, though, fought back with their own compression wear and kicked off a price war. At the time, the company’s main source of distribution, through big box chains and athletic stores such as Foot Locker, came under its own pressure as shopping moved online. Fewer and fewer people frequented shopping malls, leaving many to close, and the industry was jolted when Sports Authority filed for bankruptcy last year.

“Really every vendor that sells into that [distribution] channel is seeing the repercussions of that bankruptcy,” said Camilo Lyon, managing director at Canaccord Genuity investment bank.

Indeed, Under Armour is hardly the only casualty of the shake-up in retail. Nike has suffered. It announced a round of layoffs earlier this summer.

But unlike Nike and Adidas, which sell globally, Under Armour is still largely a domestic player. For Under Armour, “there was way too much reliance on the U.S. wholesale channel,” said John Kernan, an analyst with Cowen investment bank. “When that music stopped, the company’s growth profile dramatically slowed.”

Under Armour is working to play catch-up. Analysts say the company is making impressive strides in China, where it expects to reach $1 billion in sales by 2020. But about 80 percent of the company’s sales are still constrained to the North American market.

Consumers’ changing tastes are also a problem for Under Armour. Retail market analysts have noticed a shift away from the so-called performance segment of the retail market that Under Armour pioneered. Market research firm NPD Group also found that U.S. sales of basketball products, for example, declined by a whopping 23.6 percent between 2016 and 2017, after dropping 18 percent the previous year.

Under Armour experienced that slowdown when it had to slash prices for the third edition of its Stephen Curry-branded shoe, the Curry 3, to stay competitive with Nike’s LeBron James-branded shoe.

“Clearly the price cut was a big deal,” Kernan said. “Going from $130 to less than $100 on the Curry 3 was a big eye-opener for us.”

The growth in the market is occurring in retro and casual clothing and shoe lines, bringing fresh attention to brands such as Puma and Skechers. Nike has responded by bringing back some of its earlier offerings.

The resurgence of retro styles puts Under Armour in a difficult position.

“Under Armour is a newer brand, and they don’t have enough history to compete in this very ’90s-driven market we’re in right now,” said Erinn Murphy, managing director at Piper Jaffray investment bank.

Perhaps as a result of the setbacks, Under Armour seems focused on carving a new path.

The company recently brought on Patrik Frisk, former chief executive of Canadian footwear giant Aldo Group, as the company’s new president and chief operating officer. He is tasked with “aligning the entire company around digital,” Plank said last week, an obvious reference to helping the company build out its online sales. The company also seeks to transition into the market for so-called casual sportswear and footwear, where Aldo is a major player.

It’s too early to tell whether Under Armour’s pivot will work, but the company’s executives seem determined.

“It’s been a fight since Day 1. It was a fight to get to $1 million and to $1 billion and $5 billion,” Plank told investors in a rallying cry that seemed eerily reminiscent of Under Armour’s early TV spots. “Make no mistake: We are squarely in it. We are in this fight.”