By Tim Fitzsimons

"It's not my victory, it's yours and yours and yours," Harvey Milk said after winning a seat on the San Francisco Board of Supervisors in late 1977. "If a gay can win, it means there is hope that the system can work for all minorities if we fight. We've given them hope."

A year after delivering that speech and making history as the first openly gay elected official in California — and one of the first in the country — Milk was gunned down at San Francisco City Hall on Nov. 27, 1978. He was just 48.

But during his short time in office, Milk made his mark. He helped to pass the country’s first gay rights ordinance, which sparked the legal LGBTQ-rights revolution that has since resulted in a nationwide right to same-sex marriage and an increasing number of LGBTQ-rights protections in cities and states across the country.

Milk also undoubtedly inspired future generations of LGBTQ Americans to enter politics. Earlier this month, 40 years after his death and decades after his history-making election, a record-breaking “rainbow wave” of lesbian, gay, bisexual and transgender Americans followed in his footsteps by running for office and winning.

Harvey Milk poses in front of his camera shop in San Francisco in this Nov. 9, 1977 photo.AP file

Milk's political career started and ended in San Francisco, a city whose gay population had ballooned so much that by 1978, The New York Times estimated that up to a third of all active voters in the city were “homosexual.”

Milk, however, did not win his first campaigns for local office. Lillian Faderman, a historian and author of "Harvey Milk: His Lives and Death," said when Milk moved to the Bay Area from New York in the early 1970s, he was eager to run for office. But a Democratic official told him to wait his turn, saying, “You don’t get to dance unless you put up the chairs, and I’ve never seen you put up the chairs,” Faderman recounted in an interview with NBC News.

Faderman said "Harvey spent the next few years putting up the chairs." Milk organized a pro-gay business association and helped start the Castro Street Fair, both of which were huge successes, according to Faderman.

A Navy veteran and one-time Wall Street professional, Milk helped build a name for himself in politics not just by focusing on gay liberation, but also by addressing the most pedestrian of municipal issues: dog poop, which then littered San Francisco’s streets. Milk gained national attention when he sponsored an ordinance — still in effect today — that fined people who did not clean up after their dogs.

While Milk is today best known for his role as a gay-rights pioneer and one of the first openly LGBTQ people ever elected to public office in the U.S., Cleve Jones, an activist and a protege of Milk's, said his mentor "was never a single-issue candidate."

“He was very concerned 40 years ago about gentrification, displacement, he talked a lot about what was happening in San Francisco’s Mission District, the Latino community, during that first wave of gentrification,” Jones told NBC News. “I think he would be very concerned about income inequality, and would be the first to point out, as San Francisco demonstrates, one can have all the diversity and inclusion one can imagine, and still be ruled by oligarchs.”

Milk’s gay-rights crusade — to define and secure rights for a minority group that many people wished would sit down and keep quiet — ruffled feathers in San Francisco, which then was a city divided between neighborhoods of hippies and gays and those of working-class Catholic families. The neighborhoods represented by Milk and his killer, Dan White, represented both sides of this divide.

When Milk began to press for a city-wide ordinance to protect gay rights, his eventual killer and fellow city supervisor, Dan White, gave a quote to The New York Times, decrying the “demands” of “large minorities.” White predicted that San Francisco residents would either move out of the city or “react punitively,” the paper reported.

“Dan White ran talking to people in his district about how he would work to rid San Francisco of social deviants,” Faderman said.

Milk predicted punitive reactions to his own push for gay rights. After his death, associates released a tape recording that Milk had instructed "be played only in the event of my death by assassination."

“I fully realize that a person who stands for what I stand for, an activist, gay activist, becomes a target or the potential target for somebody who is insecure, terrified, afraid, or very disturbed themselves," Milk said on his final tape. “Knowing that I could be assassinated at any moment or any time, I feel it’s important that some people know my thoughts."

"If a bullet should enter my brain, let that bullet destroy every closet door in the country."

Milk then made a plea for the action he felt was the most radical and powerful for LGBTQ people: coming out.

“I would like to see every gay doctor come out, every gay lawyer, every gay architect come out, stand up and let that world know," Milk said. "That would do more to end prejudice overnight than anybody would imagine. I urge them to do that, urge them to come out. Only that way will we start to achieve our rights."

"If a bullet should enter my brain, let that bullet destroy every closet door in the country," he said.

The body of Supervisor Harvey Milk is wheeled from his chambers at City Hall, after he and Mayor George Moscone were shot and killed on November 28, 1978. Bettmann Archive via Getty Images file

Forty years later, Jones said Milk’s plea for people to come out still matters today, because the act of telling one's truth is still so powerful.

“Harvey understood that the single most important political act anyone could take was simply to come out — to reveal their true nature to their friends, families and coworkers,” Jones said. “Harvey understood that that was important, because he understood that hatred of us was grounded in fear, and that that fear would evaporate once people could understand that in fact they had gay people in their families and in their congregations and in their neighborhoods.”

While his life was cut short, Milk's legacy has continued to shine bright. His life story was chronicled in the Academy Award-winning 2008 film "Milk" starring Sean Penn, and his name and image can be found on stamps, streets and schools. In 2009, President Obama posthumously awarded Milk the Presidential Medal of Freedom, the highest civilian honor a president can bestow. And in 2016, a Navy ship, the USNS Harvey Milk, was named after him.

A crowd of 12,000 carried flickering candles here, as they marched from Castro Street to City Hall to honor slain Mayor George Moscone and Supervisor Harvey Milk, (shown in portrait), on November 27, 1979. In foreground is Moscone's daughter, Jennifer, 22, (light coat), as she leads the march with Cleve Jones, Harvey Milk's former assistant.Bettmann Archive via Getty Images file

Cleve Jones was in San Francisco City Hall serving as Milk’s intern on the day he was killed. “I actually found his body, and that day all I could think was: ‘It’s all over.’ I had lost my friend, a mentor, a father figure, a leader. I just kept thinking, ‘It’s over,’” Jones recounted.

“And then the sun went down,” Jones continued, “and all those tens of thousands of people gathered and marched, and that was when I knew it wasn’t over: It was really just beginning.”

On Tuesday, four decades after Milk's death, Jones will do what he and others have done every Nov. 27 since Milk was assassinated: light a candle and walk across San Francisco from Harvey Milk Plaza to City Hall.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM