Bright red hats emblazoned with the words "Make America Great Again" dominated the crowd celebrating in front of the Capitol. The hats were a powerful reminder of the dramatic change in power about to unfold in Washington and became prized possessions for some of Trump's supporters.

Mark Stroman bought five hats from a street vendor for friends back home in Los Angeles, acknowledging the political divide the apparel represented.

"I think that they brought some divisiveness," Stroman said. "They made a great divide between Democrats and Republicans but I think they made people pay attention, they made people wake up."

Campaign swag is easy to dismiss, but Trump's hat captured how his candidacy disrupted and divided the country. Like many things in Trump's campaign, it's hard to conclude there was a grand strategy that led to its success. But its connection with voters -- for good or bad -- is undeniable.

Here's the story of how the hat became one of the most powerful symbols in modern American politics.

Owning a slogan

There were no marketing experts or design research involved in the initial idea for the hat, according to former campaign manager Corey Lewandowski.

"I think somebody actually sent us a sample," Lewandowski told CNN. "They brought that sample to Donald Trump and he said, 'I like it, let's tweak this, let's do it differently.'"

Lewandowski said they tried out different prototypes, different size fonts and styles before they landed on a keeper. After that, the hats were kept on Trump's plane at all times.

It was a little more than a month after he announced his candidacy that Trump first donned the hat in public at a campaign event. When he made a much-publicized trip to Laredo, Texas, in July 2015 to visit the US-Mexico border, the hot weather necessitated a more casual look than his usual suit and tie.

"Just for the sweat factor and other things, he chose to wear the hat," Lewandowski said.

At the time, Trump was caught up in a tornado of controversy, from questioning Sen. John McCain's status as a war hero to speculation about running as a third-party candidate and a Border Patrol union backing out of the visit at the last moment.

A crush of reporters waited for Trump in the small terminal of the airport when Trump's plane touched down.

"He came around the corner and we all went, 'Oh!,' CNN's Chief Political Correspondent Dana Bash, who covered the event, remembered. "I really remember it vividly because it was like, 'Oh, of course, he's the master marketer. Why wouldn't he put it on a hat?'"

Trump briefly visited the border, and talked to the cameras three separate times, holding forth on his signature issue of immigration. In every shot, his brand was impossible to miss.

Bash was also surprised to notice Trump was wearing white golf shoes, eliciting a "crunch crunch" noise as he walked out to a podium.

Donald Trump visits the US-Mexico border wearing a "Make America Great Again" hat and golf shoes.

The hat itself may have been a fluke, but the slogan had a deeper history with Trump.

He started using the phrase as far back as 2011. It took on new meaning for Trump, however, in the wake of Mitt Romney's defeat in 2012. In both style and substance, Trump felt Romney failed to project a positive vision of American strength. Just six days after that election, Trump signed paperwork to trademark the phrase "Make America Great Again."

"He was in that chair -- that iconic chair he has in his office on the 26th floor of Trump Tower -- and he looked up and he said, 'My slogan is going to be Make American Great Again,'" Sam Nunberg, a former campaign aide who helped lay the groundwork for Trump's run, told CNN. "He looked up at the ceiling with a smirk on his face, and he said, 'And watch, everybody's going to love it.' He was right."

Trump's opponent, Hillary Clinton, criticized the slogan as harkening back to an abstract time in American history, calling it a "cruel fantasy." The phrase has been used in the past by Presidents Ronald Reagan, George H.W. Bush and even Clinton's husband, Bill Clinton.

But in the history books, the slogan will belong to Trump.

Trademark applications typically take a long time to process. Trump didn't receive the "Make America Great Again" trademark until July 2015, just in time for the trip to Laredo.

Disruptive technology

"It's just a disruptive technology," Lewandowski told CNN of the campaign hats. "People who weren't involved in politics, that didn't have a political background, wanted to show their support for something different and their way to do that was to buy hats."

The hats are sold in a range of colors, but Trump has shown an affinity for the red hat, as well as the white hat and a camo-style hat with orange font.

Trump was struck by the ubiquity of the hats, from rallies in rural America to formal GOP donor dinners, Lewandowski says. And yet, for all its resonance with supporters, the design almost seemed like an afterthought.

"It was un-designed," Lindsey Ballant, a designer and adjunct professor at the Maryland College of Art, told CNN. "It didn't represent what one thinks of when you think of traditional politics in terms of visual messaging, and that's essentially what Trump was as well."

The type is default, Times New Roman, the color design is basic, and the style, sitting oddly high on the head with a slender rope stretching across the front, matches the hats Trump has long worn on his golf courses.

"In contrast, Hillary's campaign was incredibly thought out. It was elaborate. There was a whole system driven around the simplicity and the beauty of the logo mark," Ballant says of Trump's opponent's campaign.

Trump's campaign knew they wanted to capitalize on the popularity of the hat, spending more than $2.8 million on hats from Los Angeles-based company Cali-fame, even as political operatives mocked them.

"It invited attacks from the left in a way that fit right into what I think the Trump campaign and the Trump organization wanted, which is a clash of those two political civilizations that they believed worked in their favor," Republican strategist and CNN contributor Kevin Madden said.

Lewandowski said it wasn't easy to find a US company to produce the hats. They sell for $20-$30 and cheaper knock-offs from countries like China and Bangladesh are common.

"Mr. Trump signs a lot of hats and he knows the difference," Lewandowsi told CNN. "He'd say to me, 'You know, out of 10 hats I signed, eight of them are one of the knock-offs.' He's like, 'How do we get those guys?'"

Donald Trump signs a hat after speaking at a campaign rally.

Cali-fame produces the hats now sold on Trump's website, and the ones seen on his head, but Trump's campaign also bought some hats from companies like Ace Specialties LLC and Maxim Advertising, according to finance reports.

If one wanders into the small store in the basement of Trump Tower, there is a corner devoted to campaign swag, featuring the classic hat as well as new versions unveiled after the election. The cashier there is careful to turn away any potential buyers who are not US citizens, as a purchase of the hat is considered a campaign contribution for Trump's re-election.

The hats are a physical connection between Trump and many of his rural and working class supporters, but they also continue to be a target for anti-Trump sentiment, from the many parodies of the hat, to protesters burning one at the inauguration.

No matter what emotion it inspires, the hat, once described by The New York Times as an "ironic summer accessory," has cemented its place in history. Both a red and white hat sat near the stage, enclosed in glass, at Trump's election night party.

A worker cleans the glass case around the "Make America Great Again" hats on display at Donald Trump's election night party in New York City.

"If I were ever going to design a Trump presidential library, and somebody said what's the artifact you most want, I would say the original hat of Donald Trump's under glass," presidential Douglas Brinkley told CNN. "The whole campaign can be summed up in his collected Twitters, and that ball cap."