The late congressman John Lewis (D-Ga.) will largely be remembered as a civil rights icon who put his life on the line to protest for the right to vote for black people. But his legacy contains examples of a lawmaker who used his position to advocate for other marginalized groups that he did not belong to.

“You must be able and prepared to give until you cannot give any more,” he told The Washington Post’s Jonathan Capehart last month. “We must use our time and our space on this little planet that we call Earth to make a lasting contribution, to leave it a little better than we found it.”

Lewis died earlier this month of pancreatic cancer. He was 80. He lay in state Monday in the Capitol after passing some of Washington’s most iconic civil rights landmarks, including the Martin Luther King Jr. Memorial; the Lincoln Memorial, where he once spoke to a crowd of thousands before King gave his “I Have a Dream” speech; and Black Lives Matter Plaza, where he made his final public appearance.

“John focused on the future, on how to inspire the next generation to join the fight for justice … ‘to find a way to get in the way,’ ” House Speaker Nancy Pelosi (D-Calif.) said at Monday’s ceremony in the Capitol.

As a contemporary of King’s, Lewis was one of the best-known figures to emerge during America’s civil rights movement. But years after the movement ended, Lewis’s legacy developed as one who protested for the rights of multiple groups. He said that it was his experience as a black man in America that shaped his affinity for others who experienced discrimination because of who they are.

Lewis became a vocal supporter of LGBT rights well before many Americans eventually came to support same-sex marriage. As a Baptist minister representing a majority-black district in Georgia, Lewis became a vocal supporter of gay Americans’ rights before many of the people he represented were on board.

Lewis spoke regularly about the need for those advocating against racism to join forces with those who fight against homophobia. And more than a decade before same-sex marriage was legalized, he explained why he opposed limiting the rights of LGBT people.

“I’ve heard the reasons for opposing civil marriage for same-sex couples,” he wrote in the Boston Globe in 2003. “Cut through the distractions, and they stink of the same fear, hatred, and intolerance I have known in racism and in bigotry.”

“I have fought too hard and too long against discrimination based on race and color not to stand up against discrimination based on sexual orientation,” Lewis wrote.

Lewis, who was born in rural Alabama, was one of eight members of Congress who gathered outside the U.S. Customs and Border Protection offices in 2018 to protest the Trump administration’s policy of separating children from their parents who crossed the border illegally.

“This administration has shown time and time again its attempts to dehumanize those who seek a better, safer life here in the United States,” he said in a statement that June. “This assault on immigrant families and communities is a shame, a disgrace, and an outrage.

“I will keep doing all I can to change that and make our city, our state, and our country a welcoming place for all,” he added.

Lewis spoke at the 2017 Women’s March about the continued need to advocate for women’s rights during the Trump administration.

“We’re fighting for our sisters, for our mothers, for our daughters,” he told the crowd in Atlanta. “We have a moral obligation to fight, so never, ever lose hope.”

It’s easy to find oneself on the receiving end of criticism when comparing the plight of one historically marginalized group to another, as former Democratic presidential candidate Pete Buttigieg discovered when attempting to draw parallels between discrimination faced by black people and LGBT Americans. But Lewis, who experienced discrimination because of his race that many Americans struggle to fathom, was able to communicate his philosophy on justice in a way that largely remained impervious to criticism — perhaps because of the sacrifices he made.

As calls to pass the Voting Rights Act are renewed in the days after Lewis’s death, many people will reflect on the late lawmaker’s work to make sure that black people had the same access to the ballot as white Americans. But Lewis’s legacy goes beyond his earliest days as an activist and expanded to include advocacy for those beyond his own identity group.