During the Chicago Cubs' historic World Series run in 2016, "Fly the W" became an iconic rallying cry on social media and at the ballpark, on front porches, outside downtown buildings and in all manner of other places.

The iconic, century-old flag has an interesting and colorful history likely going back to the Wrigley family's purchase of an island off the coast of Los Angeles, a shipping company and the constant changes at Wrigley Field.

Dan Wiederer: The story behind the most meaningful 'W' flight in Cubs history

Photo gallery: Flying the 'W'

William Wrigley Jr. buys a California island The chewing-gum magnate purchases Santa Catalina Island, 26 miles off the coast of Southern California, for $3 million, or more than $41 million in today's dollars. It was sold by the Banning family, who built a shipping empire in California. "Part of the purchased package was a company that the previous owners had founded in 1884, Wilmington Transportation Co. ... all of Wilmington's vessels flew the white W on a dark blue background," said Michele Bestudik, historian and film liaison for the Santa Catalina Island Co. Wilmington is a neighborhood along the harbor in Los Angeles. This W flag was possibly flown aboard a steam ferry built in 1924 that chugged to and from William Wrigley's island off the coast of Los Angeles. The flag is signed by crew members from the Wilmington Transportation Company, which operated the ships. The signatures are dated 1933. (Lucy Ruggirello / Los Angeles Maritime Museum) (Bain News Service, William Wrigley Jr., Library of Congress, Washington, D.C. and Chicago Tribune archives)

Cubs take SS Avalon to spring training Wrigley moves the team's spring training to Catalina Island in 1921. The team takes the SS Avalon from Wilmington to Catalina Island. With a ballpark built for them, the Cubs would travel to the island for spring training from 1921-41 and then 1946-51. Formerly called the SS Virginia when it sailed the Great Lakes, this ship was bought by William Wrigley Jr. and renamed the SS Avalon. It was 263 feet long and capable of carrying nearly 3,000 passengers. (Santa Catalina Island Co.)

Wrigley continues to use W flag on Catalina One of Wrigley's additions to the island was the opening of Catalina Casino, and an invitation to the grand opening featured the W flag. "What's interesting is that the invitation was sent out by the Santa Island Catalina Co., which Wrigley chaired (since) 1919. Wrigley bought the Cubs in 1921 and the ballpark changed its name to Wrigley Field in 1926. This invitation with the W-wearing pirate was sent out in 1929. While there are missing links, I think this is a good piece of evidence to support the theory that the flag design was swiped from the Wilmington Transportation Co. flag," said Stephanie Arias, reference services manager at The Huntington Library in San Marino, Calif., which holds the Banning Co. records. (Banning Co. records addenda II, The Huntington Library, San Marino, Calif.)

Wrigley Field renovations includes flags Philip K. Wrigley — a shy, diminuitive leader who refused to add lights to Wrigley Field — assumed control of the team and ballpark after his father's death in 1932. In 1937, P.K. Wrigley decided to make some adjustments to Wrigley Field to create a better experience for fans — adding new bleachers, the iconic center-field scoreboard, a flagpole and ivy to climb up the outfield walls. He put a young Bill Veeck Jr. in charge of the beautification plan, who detailed this process in his 1962 autobiography: "There was only one promotional gimmick I ever got away with. Mr. Wrigley permitted me to install lights on top of the flagpole to let homeward-bound Elevated passengers know whether we had won or lost that day. The flagpole was on top of the new scoreboard, and at its summit I put a crossbar with a green light on one side and a red light on the other. The green light told the El passengers we had won, the red that we had lost." (Holabird & Root)

W flag appears in center field The actual date when the W flag flew over Wrigley Field for the first time is not known. "There were a lot of changes to the park between 1937 and 1938 — the building of new bleachers, a new outfield wall, a new scoreboard — the flying of a new flag apparently didn't warrant a mention with so much else going on," said Ed Hartig, the Cubs historian. (Chicago Tribune historical photo 1938)

Cubs program explains meaning The won/loss flags were referenced in a 1946 Cubs program, says Todd Radom, a contributor on logos, design and visual history for Sporting News. He picked up the program on ebay, and penned a guide to Wrigley's flags. Cubs historian Hartig adds, "That 1946 program is the only one with the Cubs W flag graphic." (Courtesy Todd Radom)

Changing colors Hartig says a conversation with a former Cubs front office staffer revealed the W flag changed colors several time during this time period. No photos were available of these differences, however.

Cubs in 1st place On July 2, 1967, the Cubs beat the Cincinnati Reds, 4-1, to tie with the St. Louis Cardinals to lead the National League. As Hartig recalls, some of the more than 40,000 fans on hand refused to leave until the Cubs' flag was placed atop the league standings on the flagpole atop the center-field scoreboard. Later, the yardarm light signaled a Cubs win and the W flag was raised. (Chicago Tribune archives)

The current design and Ernie Banks "Mr. Cub" Ernie Banks' No. 14 would be the first number retired by the team on Aug. 22, 1982. A white flag with blue pinstripes bearing his number and last name would be raised on the left-field foul pole. Hartig notes Banks' flag replaced a blue Chicago Cubs flag, and also prompted the team to switch the 'Win' flag to its current design, a white flag with blue "W." (Chicago Tribune archives)

Cubs host All-Star Game "Today we think of the W flag as being iconic ... but it wasn't always this way," Hartig says. Despite its 1982 design change, he says the Cubs' media guide continued to list this flag as being on a blue background through 1989. "With the Cubs set to host the All-Star Game (in 1990), the guide was revamped and at that time someone in media relations finally noticed that they failed to change the color scheme seven years earlier." Hartig notes the 1990 media guide had the correct flag color. Chicago Cubs manager Don Zimmer returns from the locker room to acknowledge the cheers of the crowd after the Cubs defeated the Pittsburgh Pirates, 4-1, in the final regular season home game at Wrigley Field on Sept. 24, 1989. Notice the W flag on its white background above the scoreboard. (Mark Elias / AP) (Chicago Tribune historical photo 1990)

Frequent flier: The L flag The Cubs finished last in the National League Central Division with a record of 68 wins and 94 losses. The "L" for loss flag flies again over Wrigley Field on Wednesday, April 16, 1997. At the time, the Cubs were 0-12 for the season. (Beth A. Keiser / AP)

Fans unfurl flag during N.L. Central-clinching game Hartig says the popularity of the W flag took off during the 2003 season — especially in the National League Central Division race. Video from the WGN-TV broadcast shows fans holding makeshift W flags made of posterboard and golf flags. (WGN-TV video posted on YouTube)

Both flags fly on same day On Aug. 3, 2006, the Cubs split a doubleheader at Wrigley Field against the Arizona Diamondbacks, which meant both the W and the L flags flew on the same day. (Phil Velasquez / Chicago Tribune)

Another N.L. Central title to celebrate W flags sprung up outside Wrigley Field when the Cubs clinched the National League Central Division on Sept. 20, 2008. For the first time since 1906, both the Cubs and the White Sox were in the playoffs. (Paul Beaty / AP)

A memorable run With a win at Wrigley Field on Oct. 20, 2015, the New York Mets swept the Cubs in the National League Championship Series. Mets fans turned their W flag rally towels upside down to celebrate. (Nuccio DiNuzzo / Chicago Tribune)