Today commemorates the 50th anniversary of Dr. Martin Luther King Jr.’s seminal “I Have a Dream” speech, which could not have happened without the guidance of openly gay civil rights pioneer, Bayard Rustin. Portions of this story originally appeared in Eight LGBT African-Americans Who Changed the Gay Community.

Martin Luther King Jr. had a dream—and a gay ally who helped make it come true.

A pacifist and activist, Bayard Rustin (1912-1987) learned to take a nonviolent yet effective stand for equality from his grandmother, Julia, and the teachings of Mahatma Gandhi. In his youth, Rustin rallied against Jim Crow laws and the racially charged case against the Scottsboro boys. Later, he debated Malcolm X, stressing the importance of seeing the world’s various races as one big family.

Rustin first met King in 1956, when Rustin helped organize the Montgomery Bus Boycott. He educated MLK in Gandhian nonviolent protest principles and went on to organize the 1963 March on Washington, where King made his immortal “I have a dream” speech.

But Rustin’s homosexuality posed a problem: some civil rights leaders took issue with it, while members of the U.S. government used Rustin’s sexuality—and his arrest in 1953 for a “sex perversion” offense—to undermine his effectiveness. Strom Thurmond blasted Rustin as a “communist, draft-dodger and homosexual” and had his arrest file entered in the congressional record. (Thurmond also produced an FBI photo of Rustin and MLK chatting while the latter was taking a bath, to suggest the two were lovers.)

Before views about homosexuality softened, much of Rustin’s accomplishments in the civil-rights movement went unsung—though they are chronicled in the brilliant documentary Brother Outsider.

By the 1970s, Rustin began championing gay rights more directly: In a 1986 speech, “The New Niggers Are Gay,” he drew an explicit connection between the struggles of the black and LGBT communities:

“Today, blacks are no longer the litmus paper or the barometer of social change. Blacks are in every segment of society and there are laws that help to protect them from racial discrimination. The new ‘niggers’ are gays. It is in this sense that gay people are the new barometer for social change. The question of social change should be framed with the most vulnerable group in mind: gay people.”

Earlier this month, Rustin was named as one of the 16 honorees to receive the Presidential Medal of Freedom for his work as “an unyielding activist for civil rights, dignity, and equality for all…As an openly gay African American, Mr. Rustin stood at the intersection of several of the fights for equal rights.”