It was a fascinating journey through a changing and evolving country, and included significant political and trade talks that will probably lead to deeper political links and benefits for Irish business.
But the images that are likely to stick in the Taoiseach's memory long after he returns to Ireland today are not just the faces of politicians and business people, but the more emotionally charged trips: the remote mountain villages of Lesotho where very poor people gathered to express appreciation for the work of Ireland Aid; a visit to an AIDS orphanage in Cape Town where little children who will all almost certainly be dead in two years sang the South African national anthem for him; a tour of Robben Island's jail with a man who had spent 18 years there with Nelson Mandela.
Mr Ahern's five-day schedule, particularly in the first half of the week, was exhausting. It started with a long overnight journey from Ireland on Sunday and went straight into a full day of events in Lesotho. There followed two busy days of political talks, business meetings and speeches in Pretoria and Johannesburg before a final two days in Cape Town with a less demanding timetable.
Yet, despite the hectic pace, Mr Ahern seemed particularly relaxed and genuinely engaged with issues which were new to him. He departed from his prepared scripts constantly, delivering regular off-the-cuff and humorous anecdotes to illustrate points.
For the Government's official development body, Ireland Aid, the visit was a particular success. It is due to spend £6 million this year in Lesotho and just under half that on projects in South Africa.
These are relatively modest sums, but the visit by Mr Ahern and his partner, Ms Celia Larkin, who made an extra unscheduled visit to poor black shanty towns near Pretoria out of personal interest, has given them a considerable profile.
Mr Ahern and Ms Larkin were clearly struck by the work they saw being done and the gratitude of the people for relatively small assistance. For development NGOs and campaigners keen to see Ireland's contribution to development rise from its present level of 0.31 per cent of GNP towards the UN target of 0.7 per cent, the fact that a Taoiseach was so obviously impressed by development work on the ground is good news.
After touring by helicopter projects in Lesotho's mountains, Mr Ahern remarked on the need "to reflect back to the Irish taxpayers the benefit of this money". At a number of projects he remarked on the modesty of the Irish financial contribution and the amount of difference it makes on the ground. It will be interesting to see if his experience feeds into Government policy.
The visit is certain to bring real political and trade benefits, although these are difficult to measure in the short term. There had initially been concerns among Irish business people that the timing of the visit before the end of South Africa's traditional holiday period would mean many key political and business people would be away.
However, while the Government offices and buildings in Pretoria were close to deserted, Mr Ahern had substantial political discussions with the President, Mr Thabo Mbeki, and the Deputy President, Mr Jacob Zuma. He spent three hours with Mr Zuma discussing trade, the economy and the political situation in Northern Ireland and South Africa. He discussed the same subjects with Mr Mbeki for 45 minutes.
Listening to President Mbeki and other South African leaders talking about Ireland, it is clear they see the two states as having something in common. Both have been through difficult political negotiations aimed at conflict resolution, and each state sees the other as having been supportive through difficult times.
In conversation with Mr Ahern, President Mbeki referred to the fact that Ireland was one of the very few European states that refused to have diplomatic relations with apartheid South Africa. Such things are significant for the ANC-led government.
President Mbeki described relations between the two countries as very good, and the goodwill that exists is important. South Africa is seen as politically and economically significant, not just in its own right, but as a gateway to the entire region.
Ireland and South Africa have already given each other small but important support. South Africa sent senior figures such as Dr Cyril Ramaphosa and Mr Roelf Meyer to Ireland in the run-up to the Belfast Agreement to encourage support for the peace process. They provided hospitality and venues in South Africa over the past few years for round-table discussions between the Northern political leaders away from the pressures of home.
In return, Mr Ahern this week said he would help South Africa win the implementation of a £4.8 billion trade and aid deal with the EU. The deal was agreed last October and was due to come into force on January 1st, but has been blocked by Italy and Greece in a dispute over the naming of alcoholic drinks. These EU states believe that South Africa is not entitled to use names of their traditional drinks, such as grappa, for South African produce.
Irish support, of course, is unlikely in itself to resolve the problem, but Mr Ahern said it was very useful to be able to offer it. "There is a lot for us to be gained in assisting them in every way possible," he said.
What is to be gained is trade, not just with South Africa but ultimately with the entire southern African region. This is one of the new markets which must be developed if Irish exports are to continue to grow.
According to Mr Peter Coyle of Enterprise Ireland, "If you leave out the UK, the US and the main markets of continental Europe, and strip out the multinationals and food companies, you find that exports of Irish-owned companies are very modest."
Enterprise Ireland is trying to build up domestic, Irish-owned exporters, and sees southern Africa as a market with huge unrealised potential. Trade has increased sevenfold in the past decade, with Irish exports to South Africa standing at £271 million in 1998 with imports from there at just £34 million.
It is difficult to measure the success of the Taoiseach's visit in this regard. Only time will tell how much trade will increase and, even then, it will be impossible to say what amount of the extra business is due to the Taoiseach's intervention.
However, according to Enterprise Ireland and many of the individual Irish business people who travelled to South Africa this week, Mr Ahern's presence opened doors, attracted business people to hear him speak and to meet the Irish delegation, and won valuable local media coverage.
On Wednesday morning in Johannesburg's Sandton Sun hotel, more than 120 people turned up to listen to the Taoiseach outline the success of the economy and his explanation of it. Mr Ahern said budgetary discipline, EU membership, the growth of trade, inward investment, education and social partnership all played a part.
One concrete trade development did emerge this week: Labat, the major South African information technology corporation, is to set up in Ireland a finishing plant for its microchips to supply the European market. "It's not another Intel," says one business source, "but it will bring jobs."
The trip ended yesterday with more visits to projects funded modestly but effectively by Ireland Aid. The Irish party met young adults, some of whom had lived on the streets for many years, who had been rehabilitated and given the first stability in their lives by the Salesian Fathers with the help of Irish funding. Earlier they found time for a wine-tasting and lunch in one of the wine estates in the Cape.
Before leaving for Ireland last night, Mr Ahern said he had been deeply impressed by the work of Ireland Aid. "Anyone in Ireland who had seen their taxes spent on those things would have been very proud. When you actually see it, its value in your mind multiplies," he said.