A human rights icon known as an architect of the civil rights movement was posthumously pardoned for his conviction under outdated laws punishing homosexual activity, California’s governor announced Wednesday.

Gov. Gavin Newsom pardoned Bayard Rustin for his conviction in 1953 after he was arrested for having sex with two men in a parked car in Pasadena. He was in town as part of a lecture tour on anticolonial struggles in West Africa.

He served 50 days in Los Angeles County jail and had to register as a sex offender before returning to his home state of New York. He died in 1987.

Rustin was a confidant of Dr. Martin Luther King Jr. and a key organizer of the March on Washington in 1963. He also helped plan other nonviolent protests and boycotts to end legalized racial discrimination.

CNN DON LEMON PANEL FACES INTENSE BACKLASH FOR MOCKING TRUMP SUPPORTERS AS ILLITERATE 'CREDULOUS RUBES'

Newsom noted that police and prosecutors nationwide at the time used charges like vagrancy, loitering and sodomy to punish lesbian, gay, bisexual, transgender and queer (LGBTQ) people.

He issued an executive order creating what he called a new clemency initiative to identify those who might be eligible for pardons and swiftly consider those applications. He encouraged Californians to apply for clemency for people they believe meet that criteria.

California’s governor announced Wednesday that he is posthumously pardoning a gay civil rights leader while creating a new pardon process for others convicted under outdated laws punishing homosexual activity.

“In California and across the country, many laws have been used as legal tools of oppression, and to stigmatize and punish LGBTQ people and communities and warn others what harm could await them for living authentically,” Newsom said in a statement.

He thanked those who pushed for Rustin’s pardon and encouraged others in similar circumstances “to seek a pardon to right this egregious wrong.”

Rustin was stripped of his leadership post at the Fellowship of Reconciliation, a pacifist organization involved in the civil rights movement, after U.S. Sen. Strom Thurmond of South Carolina read Rustin’s arrest file into the Congressional Record.

California repealed the law against consensual sex between same-sex adults in 1975, and in 1997 the state created a way for those individuals to be removed from the California Sex Offender Registry. But neither step changed the original convictions.

CLICK HERE TO GET THE FOX NEWS APP

President Barack Obama honored Rustin posthumously with a Presidential Medal of Freedom, the highest civilian award in America, in 2013 for the 50th anniversary of the March on Washington and King’s famous “I Have a Dream” speech.

The Associated Press contributed to this report.