Crocs, perhaps the most polarizing shoe of our time, is making a comeback.

The company’s signature foam clog fell out of favor a decade ago, but now it is a star reborn on Twitter and beyond: On the runway, in the pages of Vogue and on feet of people who feel a little funny about it but can no longer resist.

The turnaround is no accident, analysts say, but rather the result of four years of strategic changes, following a $200 million investment by private-equity giant Blackstone Group in 2013.

Going classic

Since then, Crocs has closed hundreds of underperforming stores, done away with unpopular styles and shifted its focus back to its classic foam clog, which sells for about $35 and accounts for nearly half of the company’s sales.

“The classic clog has re-emerged as our hero,” said Terence Reilly, chief marketing officer of Crocs. “Certainly in 2017, there’s been a resurgence.”

Annual sales have exceeded $1 billion for six consecutive years, and profits rose 54 percent in the most recent quarter.

Analysts say there are signs that the company is reaching new customers again.

During back-to-school season, Crocs stores had a 12 percent increase in foot traffic, marking the largest jump among national retailers, according to inMarket, a California-based firm that collected data from 50 million customers to come up with the results.

“Crocs is starting to turn itself around, even in these very difficult times,” said Steven Marotta, an analyst for CL King & Associates. “This is a company that has successfully gone back to the basics.”

The company has sold more than 300 million pairs of shoes to date. Crocs now come covered in glitter and emblazoned with Minnie Mouse, Spider-Man and Batman.

‘The right balance’

The company — which markets its shoes as slip-resistant and easy to clean — has also found a niche among medical and restaurant workers. Its Bistro line, for example, includes clogs covered with eggs and bacon, sushi and chili peppers.

“We’re striking the right balance of comfort and style, and consumers are responding favorably,” said new chief executive Andrew Rees.

But that doesn’t mean it’s been an easy slog for Crocs, which has weathered its share of hard times.

In March, the company said it would close 160 stores and bring on a new chief executive after posting a $44.5 million fourth-quarter loss.

In recent quarters, the company has become profitable again.

Crocs has also benefited, analysts say, from a larger trend toward comfortable — and even ugly — shoes. Tevas, Uggs and Birkenstocks are all enjoying a resurgence, as shoppers eschew high heels in favor of less glamorous footwear.

And, analysts said, it probably doesn’t hurt that celebrities like the actress Drew Barrymore and wrestler John Cena have signed on as spokespeople.

Crocs have also made three appearances at London Fashion Week in the past year — most recently on Monday, when designer Christopher Kane outfitted models in rhinestone-encrusted Crocs.

“Now that consumers have gotten very comfortable wearing their athleisure gear, they want to be comfortable all the time,” said Beth Goldstein, a footwear analyst for research firm NPD Group. “At the same time, [Crocs are] now a classic, and classic is cool.