To celebrity-watching tourists at last Thursday's U.N. Security Council meeting, he was an invisible man - a youthful-looking black seated discreetly behind the foreign ministers and other famous names of diplomacy.

Yet, as those assembled around the council's circular conference table were aware, Donald F. McHenry, a U.S. diplomat who is two months short of his 42nd birthday, had played the single biggest role in the events that had brought them there.

Speifically the council was meeting to pass resolutions setting in motion the machinery for Namibia (Southwest Africa) to gain its independence after 58 years of control by white-dominated South Africa.

The vote unleashed a flood of oratory about the historic nature of the occasion. To Secretary of State Cyrus R. Vance, it was "a new chapter in the history of the United Nations," demonstrating that the tense racial conflicts of southern Africa can be solved through peaceful negotiation rather than bloodshed.

Vance's enthusiasm was understandable, since the Namibia agreement is widely regarded as a triumph for U.S. diplomacy. The administration hopes the Namibia independence accord, if brought to a successful conclusion, will serve as a model and spur for resolving other black-versus-white conflicts in Rhodesia and, eventually perhaps, even in South Africa.

Whether that will actually be the case remains to seen. For the moment, though, the accord has had several effects including a badly needed boost for the prestige of President Carter's controversial and newly embattled U.N. ambassador, Andrew Young.

Young's contention that Africa's problems can be settled only by enlisting the countries of the region in their solution provided the inspiration for the strategy used in bringing together the contending forces in the Namibia dispute.

While Young was the spiritual father of the game plan used in Namibia, it was Don McHenry, the little known deputy U.S. ambassador to the Security Council, who performed most of the intricate footwork required to work out the Namibia agreement.

For 16 months, McHenry traveled tens of thousands of miles across three continents as the point man of the effort to induce the South African government and the guerrillas of Namibia's Southwest Africa People's Organization (SWAPO) to stop fighting each other and come to terms on a U.N.-supervised plan for independence.

It was one of the most complicated negotiating tasks in modern diplomatic annals. It involved not just South Africa and SWAPO but also the five major Western powers - the United States, Britain, France, West Germany and canada - and the five so-called frontline black African states, two of which, Angola and Mozambique, are ruled by Marxist governments.

The objective was first to come up with a plan to which all these diverse parties could agree. Then, the task became one of using, persuasion, pressure and persistence - the West working on South Africa and the African states on SWAPO - to bring the two long-time enemies to accept the plan.

It was a task that required the overcoming of countless obstacles, repeated setbacks and frequent threats by both South Africa and Namibian nationalists to scuttle the process. That it finally resulted in an agreement - fragile and uneasy, to be sure, but still accorded a good chance of succeeding - is described by many of those involved as due, in large part, to McHenry's quiet, untiring efforts.

Working quietly in the shadow cast by the outspoken, highly visible Young has been McHenry's forte. He is almost totally unkown outside diplomatic circles.

Because he is black, many have assumed that McHenry was one of the veterans of the civil rights movement brought by Young to the United Nations. ActuallY, the two did not even known each other until they were picked for their United Nations posts.

McHenry, a native of St. Louis and a graduate of Illinois State University, originally aimed at a teaching career, but instead became one of the blacks recruited into the Foreign Service during the early 1960s. He spent almost 10 years in the State Department, resigning in 1973 to go into foreign policy research.

When Carter was elected. McHenry served on the transition team preparing the new administration's takeover at State; and, largely at the instigation of Vance who had known McHenry during his foreign service days, he was picked for the U.N. deputy's job.

"Andy and I saw eye to eye on most things, particularly where southern Africa was concerned," he says of his relationship with Young. "We both felt the United States had been too long in the position of opposing all the African proposals, while offering nothing but platitudes in return. We decided to see what we could do about working with the Africans for a change."

The opportunity came when the Western powers decided to seek a Namibia solution and picked McHenry as chairman of their so-called "contact group." It was the start of the long, wearying process that soon had him crisscrossing the Atlantic to Europe and Africa as regularly as other New York residents commute to the suburbs.

"I'd find myself going to London for the weekend and being back in the office on Monday," he recalls. "Once I left New York at 7 o'clock on Monday evening for Paris and was back by 5 p.m. the next evening."

The African part of his negotiating trips was even more difficult, particularly when it came to finding and talking to Sam Nujoma, the elusive, fast-moving leader of SWAPO.

"We had half our embassies in Africa looking for him so frequently that we finally took to titling our cables about SWAPO. 'In Search of Sam Nujoma,'" McHenry says. "Once I went all the way to Tanzania for a meeting with him, and he never showed up."

As McHenry got deeper into the negotiations, he found that "I was serving a useful purpose as a lightning rod for the anger of both sides. When I had to transmit a particularly tough demand from one to the other, it made it easier for them to swallow if they could put the blame on me - if they could say to themselves. 'It's not SWAPO or South Africa I'm mad at.' It's that SOB McHenry.'

In the process, he became a collector of the cartoons attacking him in the nationalist South African press. "Just yesterday," he notes, "there was one portraying me as a dog jumping through a hoop held by Sam Nujoma."

Actually, McHenry says, "The South Africans have a sort of love hate thing going with me. I'm not an advocate of some of the more extreme ideas that other American blacks have advanced for dealing with South Africa."

"I suspect," he concludes, "that the South Africans believe that if they can't get along with the Don McHenry's of this world, they can't get along with a lot of people."

As to the future, McHenry point to the "reservations, doubts, suspicious and veiled threats" made by both South Africa and Nujoma at Thursday's council meeting as evidence that a lot of work will still be needed to make the Namibia agreement stick. "I guess I'll be dealing with it for some time to come," he says.