The world didn’t always recognize Nelson Mandela as an icon. For 27 years, he was a prisoner. Outside his prison walls, blacks in South Africa could not vote. They were forced to leave their homes to live in racially designated areas. Education, jobs, even beaches, were segregated. It was illegal to protest. People, including schoolchildren, did it anyway. They were killed, injured, attacked by dogs, imprisoned and tortured.

Apartheid, eventually and finally, became an international outrage. It touched Maine. Starting in the late 1970s, activists including University of Maine philosophy professor Douglas Allen, launched an effort to convince the University of Maine System to divest in all banks and corporations doing work in South Africa. They met with trustees and held sit-ins, protests and demonstrations until 1982, when the board of trustees — proudly, even — voted to divest.

It would be several years more before the University of Maine Foundation did the same (after the activists went to the Legislature to see about revoking the foundation’s charter, Allen said). Until then, when the group tried to meet with foundation members, they called police.

“You kind of plod along because it’s the right thing to do. So many people are dying, being tortured, and you’re complicit in it. But you can’t imagine you’re going to be successful,” Allen said. When officials agreed to divest, “It was one of those intense peak experiences you have in life.”

A similar effort was happening at the national level. Fred Hill, who lives in Arrowsic, was foreign affairs director for Sen. Charles “Mac” Mathias of Maryland, a moderate Republican key to passing legislation in 1986 that extended sanctions to South Africa, escalating pressure on the government to reform.

Hill remembers Democrats on the foreign relations committee wanting to extend severe sanctions, such as shutting down the U.S. embassy there. But doing so would shut down communication and intelligence. So the moderates — namely Mathias and Sen. Daniel Evans of Washington — worked to change the Democrats’ mind and bring GOP senators around to legislation that would ban investment in South Africa, prohibit the importation of products such as steel and coal from South Africa, and demand the release of Mandela.

They needed that bipartisan support when President Ronald Reagan vetoed the bill. Even though the Senate was led by Republicans, they defied their party leader, voting 78-21 to override the veto.

Maine’s William Cohen, a senator at the time who later became defense secretary, was one Republican to support the sanctions.

“There was no way the United States could remain indifferent to the sway of history,” he said Friday.

And those sanctions had an effect.

The world will rightly revere the life of Mandela, who was elected president in 1994 and guided Africa’s biggest economy to democracy. As one of the most influential people of the century, he is noted for forgiving his imprisoners and working to reconcile the country’s deep divisions.

But there is danger in exalting a man too much. Instead, revere the cause he and so many others fought for: freedom from oppression, racial and economic equality, cooperation and healing. Fight for the same.

The causes Mandela devoted his life to echoed everywhere. Former U.S. Sen. George Mitchell, who grew up in Waterville, said Friday he briefly met Mandela a few times after he took office. Mandela’s influence was felt later in Northern Ireland, as Mitchell helped broker peace there.

“He once hosted a meeting of Northern Ireland political leaders, and when they insisted on separate meetings — it was then politically difficult for them to be seen together in public — he scolded them both in a way they never forgot,” Mitchell said. “His courage and fortitude were an example to leaders and would-be peacemakers everywhere.”

May that example continue to be followed.

Allen, the philosophy professor, recalled the day in 1990, after Mandela had been imprisoned for nearly three decades, when he famously came to New York City and held a rally with more than 200,000 people in Yankee Stadium. Allen didn’t go to the stadium. He was at a church in the city, with about 100 others from across the country who had dedicated their lives to ending apartheid and wanted to celebrate. No media were present.

“All of a sudden, after all these years, who appears? Nelson Mandela,” Allen said. “I just — oh.” He fell short of words for a moment.

“He got up,” Allen said. “He said, ‘Tonight, I’m going to be at Yankee Stadium. Everyone will be up there celebrating me, all the important people of money and politics. … I just wanted to tell you, I know who my friends are, and I’ll never forget that. I know who stood by me, and the entire apartheid movement all those years, when it looked like there was no hope.’”

In the memory of Mandela, who died Thursday, offer someone else hope.