This country, and Nelson Mandela, always occupied a special place in my heart.

It was here that I launched my career as a foreign correspondent in the second half of the 1990s, freelancing for Newsweek and other publications. My first reporting assignment was the funeral of anti-apartheid leader Joe Slovo in Soweto.

Covering post-apartheid South Africa in those years was magical. The place was dynamic, imbued with a sense that anything was possible, despite the numerous challenges of healing the wounds inflicted by a cruel and discriminatory segregated system.

Mandela, South Africa’s first black president, was a commanding presence at news conferences. Dressed in his traditional, long-sleeved African shirts, he would shake my hands and flash his famously wide smile, as if I were the most important person in the world. He made everyone feel that way.

This month, I returned again — this time to cover the funeral of the great man himself.

Early Sunday, I put on a black suit and black shoes, and interviewed relatives and dignitaries as they arrived at Mandela’s salmon-colored homestead in his childhood village in the Eastern Cape for a state funeral and private burial.

Foreign journalists were not supposed to be allowed inside the compound. But I decided to give it a try. A colleague and I walked to the front gate. The guard looked at my media credentials, my somber attire. He asked me to take off my sunglasses. He looked again at the credentials. And to our surprise, he waved us through.

A long, gravelly road wound past Mandela’s elegant home and through the green hills. Along the way, there was a cavernous white tent, the size of a football stadium, where the state funeral was taking place. Beyond that was the grave site where Mandela would be laid to rest, overlooking the tranquil village. As I walked, taking in the cold, clean air, I heard one guest jokingly complain about the considerable distance to the tent. I couldn’t help but respond.

“But not as long a walk as Madiba’s,” I said, referring to Mandela by his Xhosa clan name and alluding to the title of his famous autobiography, “Long Walk to Freedom.”

Inside the tent, lit by large, square, modernist chandeliers, thousands of relatives, friends and dignitaries — from Prince Charles to the Rev. Jesse Jackson to Oprah Winfrey to business magnate Richard Branson — had gathered to say a final farewell.

Many wore dark suits, but there were plenty of people in tribal, military or everyday attire, a testament to the diverse worlds Mandela traversed — and influenced — during his 95 years. On the stage, an orchestra and choir produced emotionally stirring music. Behind the podium, a wall of cream-colored candles flickered near a large portrait of Mandela. His coffin, draped in the South African flag, rested nearby.

During the eulogies, it was easy to see how Mandela’s legacy lives on.

It lives on through Joyce Banda, president of Malawi and Africa’s second female head of state, who spoke about how Mandela inspired her.

It lives on through his 18 grandchildren and 12 great-grandchildren, who, we learned Sunday, cherish memories of dinners with Mandela where he told stories of his life.

And, I like to think, it lives on in the memories of thousands of journalists and photographers, in South Africa and around the world, who spent so much of their careers covering Mandela’s struggle and the freedoms he brought to his nation.

For me, it was an honor and a privilege to say farewell to Mandela by bearing witness to his final journey.