HISTORY PLAYS FUNNY TRICKS. BEFORE PASSING JUDGMENT on the life's work of an individual, history can change the rules of evidence, rewrite laws and install a new jury. And if you're the South African ambassador to the United States, you can see it happening, right before your eyes.

Which is why, in the twilight of a political career that has spanned 27 years of apartheid, Pieter G.J. Koornhof strives to make a case that he should not be found wanting even after history is rewritten to meet the standards of the "new" South Africa that is emerging. A veteran of his country's ruling National Party, Koornhof says his own efforts to change the system from within deserve partial credit for the steps toward reform and reconciliation taken by South Africa's president, Frederik W. de Klerk.

Inside the Massachusetts Avenue embassy, sitting in front of shelves of dark green bound volumes containing years of transcripts of the all-white South African Parliament, Koornhof presents Exhibit A in his own defense: one of four original copies of the 627-page doctoral dissertation he wrote as a Rhodes scholar in 1953. Its pages are yellowed, its blue binding faded and worn. Titled "The Drift From the Reserves Among the South African Bantu," the imposing volume is an eloquent critique of the migrant labor system that has underpinned the division of the races. Written with the urgency of youth, it predicted that the migrant labor system would bring down apartheid. No, Koornhof tells you in his rambling way, he is no Johnny-come-lately to reform.

At one time, the dissertation hung over the career of Piet Koornhof as a threat; right-wing whites cited it as proof of Koornhof's political heresy, and he tried to play down its importance. Now, the paper hovers as a historical question mark. If Koornhof possessed the insight to write such an attack on a fundamental element of apartheid, how could he go on to hold cabinet posts in two apartheid governments and sign papers that led to the bulldozing of entire black communities in the late 1970s and early 1980s?

That question sounds different in 1991 in Washington, D.C., Koornhof notes, than it did 10, 20 or 30 years ago in Pretoria, when all the institutions of Afrikanerdom -- the best university, the church, the party, the family -- supported the policy of apartheid.

And yet the outgoing ambassador, who will return to South Africa next month, is sensitive to its judgmental implications. At the end of a long, relaxed and wide-ranging interview, he returns to it to make an uncharacteristically succinct point:

"The question implies that I am a liar," he says. "I am not a liar. I don't think that I live a lie, and nothing would give me more heartburn and sorrow." BY THE STANDARDS OF SOUTH AFRICAN DIPLOMACY, Koornhof's tenure in Washington is rated a success -- though for a South African ambassador to the United States, success is always a relative term.

During his nearly four years here, there were no mass arrests on the doorstep of the Massachusetts Avenue embassy. There were no new sanctions imposed. There were no particularly new cries of outrage against the white-run Pretoria government.

"It escapes people that in 1988, there was nothing against South Africa," Koornhof says. "In 1989, there was nothing against South Africa. And in 1990, there was nothing against South Africa. Nothing. Nothing. Nothing."

Perhaps "nothing" is the most a South African diplomat can aspire to in the dying days of apartheid. When Koornhof arrived in the United States in 1987, Congress had recently voted overwhelmingly to override President Reagan's veto of the Comprehensive Anti-Apartheid Act, which imposed trade restrictions and barred new investment in South Africa. Now, on the eve of his departure, the absence of new punitive sanctions by Congress against his country qualifies as a triumph of sorts.

But then it isn't easy representing a pariah state. And in the eyes of many diplomats and politicians, the 65-year-old Koornhof has the perfect qualifications for the job.

For one thing, he has a thick skin. Even though he was the only African ambassador not invited to a reception for Nelson Mandela at the Madison Hotel in June, and even though Mandela ignored his offer to help make arrangements in the United States, Koornhof nonetheless wished Mandela a "good trip" and said, "We are confident that through a spirit of conciliation, peace, justice and stability will be achieved in South Africa."

For another thing, Piet Koornhof has demonstrated a remarkable ability to adapt, to find ways of serving a variety of National Party leaders. When Koornhof came to Washington, he represented a government headed by the combative President P.W. Botha, who had imposed a state of emergency and was keeping thousands of opponents in jail without charge or trial. Now Koornhof represents de Klerk, who has freed political prisoners, legalized long-banned political organizations and extended a hand of friendship to many of the people Botha called enemies.

The visit of Mandela highlighted this transformation. Koornhof won his first elected government position the same year Nelson Mandela was sentenced to life imprisonment. For nearly the entire quarter-century Mandela languished in jail, Koornhof was a member of Parliament for the ruling party, and for 12 of those years he served in the cabinet. Yet when Mandela addressed a joint session of Congress this year, Koornhof took his seat among foreign diplomats and enthu- siastically joined the standing ovation

when the speech was over.

Koornhof's friends say such adaptability is a virtue and a sign that white South Africans are changing. His critics call it typical of the ambassador's career-long

opportunism and lack of principle.

Certainly de Klerk's moves have eased Koornhof's difficulties in explaining his government to Americans, and Koornhof says that extending rights to blacks has been his goal for more than three decades. He says the government's new policies are a vindication of his doctoral thesis and the fulfillment of prayers he has made in Christian fellowship meetings with black South Africans for the past 20 years. And while de Klerk was one of the more conservative cabinet members until last year, Koornhof has always been considered part of the ruling party's verligte, or "enlightened," wing. "We don't take anything away from President de Klerk. He had courage and vision. But we are soul mates in this," Koornhof declares. Adapting a phrase from John Winthrop, he says that South Africa can become "a shining city on a hill."

Back home, he might have a tougher time convincing people of his liberal bona fides. "Like many Nats, he has had a transformation," observes his longtime parliamentary foe, Helen Suzman. Fellow Afrikaner Frederik Van Zyl Slabbert, former leader of the opposition Progressive Federal Party, calls Koornhof a "slipstream politician. He is always in the slipstream of power, making liberal noises. But he has never been out in front. He is a good juggler and a survivalist."

South African political scientist Hennie Kotze compares the conversion of Koornhof and other prominent South African politicians to the sudden disappearance of acknowledged communists in Eastern Europe. During a recent visit there, Kotze asked someone what had happened to all the old communists. The reply came back: Where are all the supporters of

apartheid? A BEEFY MAN WITH HUGE EARS AND DISTINCTIVE, FLARING earlobes, Koornhof dresses in the conservative dark suits characteristic of South African cabinet members. Descended from Dutch settlers, he exhibits the expansive hospitality and Old World manners of many Afrikaners who grew up in more traditional times.

He was born in a small town in western Transvaal province on August 2, 1925. His father was a Dutch Reformed Church minister, a respected profession in a small town. His mother was a leader of the South African Women's Federation, at that time the preeminent organization for white women.

But Koornhof was no ordinary parson's son. In 1947, he received a BA with honors from the University of Stellenbosch, the Harvard of Afrikanerdom. He won a Rhodes scholarship and spent five years working on his doctorate at Oxford. During that period, he spent nine months living in a Zulu settlement, or kraal, in the isolated hills of the Natal province.

Those were turbulent times. In 1948, the National Party won power, promising to reinforce and widen existing racial barriers and to promote the interests of Afrikaners, who had held a back seat to English-speaking white South Africans in business and other areas. In 1949, the government prohibited interracial marriage. In 1950, it enacted the Population Registration Act, which categorizes every South African according to race and ethnic group, and the Group Areas Act, which sets aside separate residential areas for every racial group. (The government plans to repeal the Group Areas Act next month. The Population Registration Act will remain for now.)

In response, black South Africans were becoming more militant. Younger members of the African National Congress, led by Walter Sisulu and Nelson Mandela, had tossed out the ANC's old guard and invigorated the organization with a civil disobedience campaign against apartheid laws.

Against this background, the young Koornhof penned his massive critique of the evils of migrant labor, which was at the heart of the apartheid system. Under the system, blacks are considered temporary guests in urban areas. Thus millions of black South Africans spend 50 weeks a year working in cities while their families remain behind in "tribal homelands." Ultimately, all blacks would become citizens of "independent" tribal homelands, while continuing to work in "white" South Africa.

Koornhof's dissertation described the history of migrant labor, African labor migrations and the character of a modern Zulu society that was missing most of its adult males. It also compared South Africa's development to Britain's Industrial Revolution and analyzed how Britain "obviated a bloody revolution" -- one of Koornhof's favorite themes.

Africans, he wrote in 1953, "now desire, and will increasingly desire, the same social and political rights as those enjoyed by the Europeans." Urbanization, he said, "integrate{s} these different groups in the same economic system to such an extent that it has become impossible today to render them asunder without the collapse of the whole structure, in which case chaos and anarchy will prevail."

The words seem prophetic today. "In this situation," Koornhof wrote, "there is a tendency for African opposition and rebellion to increase, for governmental force . . . to become harsher and social relations to become increasingly strained. This whole process operates in a vicious circle . . ."

The Nationalists' attempts to stop the growing integration of the country and push blacks back into separate tribal homelands would fail, Koornhof predicted. "Restructuring society is like replacing the wheels of a train while it is in motion, rather than rebuilding a house on new foundations . . . The South African Society has broken down into groups that show an ever increasing hostility to each other; irrational hates are taking the place of even the limited amount of cooperation there might have been. This, historically, has been the precursor of downfall for many valiant civilisations."

Oxford wanted to publish the thesis, but Koornhof -- realizing the political effect it would have in South Africa -- said no. "If I had published that at the time," he says now, "I should have stayed in Britain." He was offered teaching jobs there but decided to return home.

He says that he made the decision when he went to the funeral of King George VI, who had visited South Africa. At the funeral there were mourners from a variety of countries. Standing at Hyde Park Corner, Koornhof says, he thought "about how people in my country had no symbol of unity." So "I decided I must go back to my country and promote better understanding between people in my country. I might not always have succeeded. But that was why I entered politics." PROMOTING UNDERSTANDING MAY

have been his youthful intention, but Koornhof's critics say his career took him on a different path. "What was contained in his thesis didn't become his practice as minister," Helen Suzman says. "He certainly wrote a thesis on the evils of the migrant labor system, but as minister he had to carry out the opposite policy."

On his return from England, Koornhof moved quickly up the ladder of Afrikanerdom. In 1958, he became assistant secretary of the National Party in the Transvaal province. In 1962, he became secretary of the Afrikaanse Broederbond, a secret society of the most powerful Afrikaners. His public title was director of cultural information of the Federation of Afrikaans Cultural Organizations (FAK was its Afrikaans acronym). But a secret circular sent to all members of the Broederbond in 1962 said that the group's executive council "is thankful that arrangements can be made with the FAK to link the post of our chief secretary with the public post as it enables friend Piet Koornhof to carry out our activities tactfully, in the open."

The goal of both organizations was the same: to promote Afrikaners and their culture. Koornhof was present at a 1965 meeting at which Broederbond leaders discussed a propaganda campaign that would Afrikanerize English-speaking South Africans. It led to several unsuccessful efforts to take over the country's leading English-language newspapers. In 1964, Koornhof became a member of the all-white South African Parliament. A far-right group got hold of his thesis and accused him of being a traitor. "I've had death threats from whites in my time," Koornhof says. "Plenty."

Starting in 1968, he held four different sub-cabinet and cabinet positions, including minister of national education and sport and recreation. Koornhof says that he was always pushing for liberal policies. Faced with an international boycott of South African sporting events and South African athletes, Koornhof broke down many of the racial barriers in sports in South Africa during the 1970s. He became known as a leader of the National Party's reform wing, advocating in 1977 a racial federation he described as modeled loosely on the Swiss canton system.

In a biography of Steve Biko, the black-consciousness leader killed in detention in 1977, the white liberal journalist Donald Woods quoted Biko as saying that Koornhof appeared to have "human qualities not totally stifled by his Nationalist environment." Woods said Biko added that "it seems there is quite a nice guy there trying to get out."

In 1978, Koornhof became minister of plural relations and development. Plural relations was the euphemism for black affairs. Later, Koornhof gave it the Orwellian name of Ministry for Cooperation and Development. The ministry was responsible for everything from black education to the resettlement of black townships deemed too close to white cities.

Though Koornhof quadrupled the amount of money spent on black housing and invited government opponents to advise him on a wide variety of issues, this job sharpened what many saw as a conflict between the frequent liberal pronouncements he made and what he did in prac- tice. He acquired the nickname "Piet Promises," for promising much and delivering little. Others called him "Piet Pinocchio," saying that his already-bulbous nose was growing longer as he told liberal lies. Koornhof himself once ruefully quipped that "every time I make a law, it is treated as a joke; every time I make a joke, it is treated as a law."

He became embroiled in a controversy over the annexation of the territory of Ingwavuma and carried out the government's policy of forced removals of communities, including the celebrated case of the Mogopa people, who were ousted from their traditional home. Koornhof signed the removal order. When a court reversed the order, another department closely associated with Koornhof's expropriated the land under a different law. Six years after the Mogopa were uprooted, the high court of South Africa gave them permission to return to their land. By that time Koornhof was in Washington.

Koornhof argues that even though some black communities were destroyed, he saved 15 black townships from forced removal. The most prominent were Alexandra, on the edge of Johannesburg, and Crossroads, a squatter camp at the edge of the Cape Town airport that was the site of running battles between gov- ernment bulldozers and determined squatters. "I went to Crossroads. I pardoned Crossroads. I saved Crossroads. I don't like to say it, it looks like I am bragging," the ambassador says. "But if you look at the facts, you'll see it's true."

Not everyone agrees. Before Crossroads received its reprieve, it had become an international cause. Every night, gov- ernment bulldozers would destroy shanties, and every day poor blacks, who were working in Cape Town and unable to find housing in the carefully circumscribed black townships, would throw their shacks back together again.

William B. Edmondson, U.S. ambassador to South Africa under President Jimmy Carter, was one of the steady stream of people who met with Koornhof to remonstrate over the fate of the squatter settlement. "I had the feeling that you get with people who make liberal statements and then nothing much happens. There were more promises than results," Edmondson recalls. "You never know when someone like that is easing you out of his office with kind words." Koornhof never hesitated to grant Edmondson a hearing. But, Edmondson says, "he would give long, long lectures. If you were in {his office} for a minute, you would be in for an hour. A question would stimulate another stream of liberal ideas, and yet you came away with the feeling that it was a waste of time."

Slabbert, the former Progressive Federal leader, says international pressure spared the Crossroads squatter camp. As for Koornhof, Slabbert retorts, "I don't think he saved anyone. He saved himself, quite frankly." Ethel Walt, a white woman who helped start a Transvaal organization to resist removals like that of the Mogopa, says that if Koornhof was truly concerned, "he had a very peculiar way of showing it."

"That there were removals, and bad removals, I can't deny," Koornhof replies. "But in my time we started to do away with removals. It is not feasible, even as minister, to stop removals. There were moneys involved, and planning done 10, 15 years in advance. It was a matter of growing out of it. It could not be cut off all at once . . . I got tremendous oppo- sition within the ranks of the cabinet. I got tremendous opposition within the department."

The alternative, of course, would have been to resign and join the opposition to the National Party. But among Afrikaners, dissent was a lonely road, guaranteeing ostracism. "It would have gone against my whole upbringing," Koornhof says now. Still, he says, he often thought of himself as having a kind of kinship with Helen Suzman, who for many years was the sole opposition member in the white Parliament. "She was working from without and I was working from within," Koornhof says.

Suzman says she feels no common bond with Koornhof. "It is one thing to talk about {participating in} Parliament," she says, a decision she made that drew criticism from the left. "It is another thing to go into the heart of a government that goes against your principles."

Hennie Kotze, who teaches politics at Koornhof's alma mater, Stellenbosch, acknowledges that as minister of cooperation and development, Koornhof was in a tough spot. His ministry had the biggest chunk of the civil service. In South Africa, nearly one out of every three whites works for the government. They tend to be conservative, and until recently they formed a solid National Party voting bloc. Still, Kotze believes, Koornhof could have done more. "If there were enough Koornhofs around who had stood their ground earlier, maybe apartheid would have ended sooner."

Troubled by the notion that he wasn't true to his liberal leanings, Koornhof says: "Where I failed -- and I often thought about it very deeply, and I don't know whether it is an escape route on my part -- but where I failed, I think I failed for reasons beyond my control . . . I just know it. As sure as I'm looking at you. I can't change a person's heart." ON A BRIEF TOUR OF THE UNITED

States in 1979, Koornhof made more waves than he has during his entire stint as ambassador. In a speech to the National Press Club in Washington, he said that "apartheid, as you came to know it and as you know it in the United States of America, is dying . . . We want it to be dead forever more." He proclaimed that an era of "reform" had begun. He said that the migrant labor system should be phased out along with the so-called dompas, a document required of blacks to prove their right to work in "white" cities without being deported to the homelands. "I detest the dompas," Koornhof said. "I declared war on the dompas. That thing must be ousted -- completely and totally -- out of my country."

A storm of controversy greeted him on his return to South Africa. Andries Treurnicht, a conservative cabinet minister, led the charge, and President Botha forbade the use of the word "reform" for several months afterward. Eventually, after several months, Botha adopted Koornhof's language ("another perfectly good word ruined," one American corporate adviser moaned). Treurnicht bolted and formed the Conservative Party.

Meanwhile, if apartheid was dying, it looked like it was going to be a slow death. A cartoon at the time showed Koornhof reading his speech in front of a coffin marked "apartheid." Out of an opening in the lid of the coffin, a skeletal hand reached out to tap him on the shoulder.

In the early 1980s, Koornhof led efforts to write a new constitution, which created the tricameral Parliament that still exists in South Africa. It has separate houses for whites, Indians and people of mixed racial ancestry, known as Coloureds. Two other pieces of legislation, which became known as the Koornhof bills, created community councils for blacks.

South African cabinet member Gerrit Viljoen later called the constitutional reform package "the greatest miscalculation in the history of the National Party." It unleashed a backlash among black South Africans, who felt excluded, and helped spur the creation of the United Democratic Front, a nationwide coalition of anti-apartheid groups. According to a pamphlet distributed at the UDF launch, the government had given blacks "a third-class seat in their apartheid train."

The new constitution created a President's Council, a body with 60 members from all racial groups. Koornhof became its chairman. It was a potentially prominent position. But since a majority of the members were from the National Party, the council's power was mainly advisory. And President Botha didn't take much advice, so Koornhof faded in importance.

In late 1986, Botha asked Koornhof to become ambassador to the United States. Relations between the two countries were at a low point. South Africa was expelling foreign journalists, jailing its opponents, raiding its neighbors. The embassy in Washington was besieged by demonstrators courting arrest. An unusual alliance of Republicans and Democrats had united behind sanctions to deal President Reagan his most decisive legislative defeat. And American companies were pulling out by the dozens.

Nonetheless, Washington and London are South Africa's two most important diplomatic posts, and Koornhof accepted. Besides, things couldn't get much worse. With the sanctions bill passed into law, the anti-apartheid movement lost much of its steam. And the most prominent American companies in South Africa already had stopped doing business there. "I GOT VERY GOOD ADVICE FROM ONE of your top guys when I got here," Koornhof says of his arrival in Washington. "Such a person will give you bloody good advice. Well, I followed this man's advice. He said, don't do as your predecessors have done. Give the facts to the main players in this country and leave it to them to deal with it in their own way."

In short, lobby. Quietly.

On the assumption that any publicity about South Africa is bad publicity, Koornhof has kept a low profile. And not surprisingly, he is full of admiration for the quiet peddlers of influence in this city. "What is commonly called lobbying, do you know what wisdom lies behind that?" he says. "That one single word, 'lobbying'? Good lobbying is greater and more powerful than the news media. More powerful than the networks and the best newspapers. Lobbying is extremely powerful. It is one of the great hallmarks of America and Washington.

"To me, lobbying is a great discovery. A very powerful thing. Lobbying has the quality of substance and truth."

Putting this philosophy into practice, Koornhof has cultivated a circle of lawmakers and opinion makers, hosting private dinners and trading in the currency of small diplomatic favors: visas, invitations, tours. On his table sits a photograph of him with Sen. David L. Boren (D-Okla.), who has written on it: "To Ambassador Piet Koornhof, With appreciation for your friendship and respect for your able representation of your country and your personal commitment to the highest human values."

Over the years, Koornhof has spoken to numerous business groups and Rotary clubs, but though he was willing to bring this reporter to such a private meeting, the groups that had extended recent invitations to him did not want to be associated publicly with the ambassador; none would agree to let a reporter accompany him.

He has also reached out to longtime foes of the South African government. He has spoken frequently to Rep. Howard Wolpe (D-Mich.) and has tried to cultivate members of the Congressional Black Caucus. He sponsored a table at this year's Martin Luther King Jr. Day breakfast at the Grand Hyatt.

When President de Klerk visited Washington and was given a dinner at the embassy, Koornhof sent word through a Senate friend that he would invite Randall Robinson, head of TransAfrica and a leader of the sanctions campaign, if Robinson would accept. (Robinson said he would not; the last time he went to the embassy was when he was arrested there in 1986.) Lawmakers from the Black Caucus refused to meet de Klerk as a group, but individual members met with the South African president separately.

Koornhof is a born-again Christian, and he has also made contacts with Americans through religious groups. At a pre-Christmas dinner gathering at the opulent ambassador's residence next door to the embassy, he hosted an odd assortment of people who share his spiritual commitment. Present, among others, were Samuel Hines, a flamboyant black church minister from Washington; Paul Temple, a lawyer and oil investor from Virginia; Tom Getman, a Quaker-bred administrator for World Vision, an international social action organization that sponsors anti-apartheid projects in South Africa; and Ross Main, a South African-born Episcopal clergyman who has lived in the United States for many years.

In addition, the ambassador has used his post to bring South Africans in contact with American ideas. He has sent copies of a video about the bicentennial of the Constitution as well as copies of the Federalist Papers to various South Africans.

He has introduced conservative South African officials who visit the United States to Americans who might persuade them to be more open-minded. Sam Dash, the former Watergate investigator who is now a professor at Georgetown University Law School, went to South Africa in 1985, obtained permission to visit Nelson Mandela in prison and wrote an article praising the jailed ANC leader as a moderate prepared to negotiate. Koornhof made sure that a copy of the article was delivered to Mandela when prison officials would not allow it to be delivered. Later, when Koornhof came to Washington, he invited Dash to meet South African judges, members of Parliament and army officers so that Dash could give them his impressions of Mandela and persuade them that the ANC leader should be released. This was done before de Klerk came to power.

"I was impressed with his consistency and his sincerity," Dash says of Koornhof. "I'm an investigator, I have to assess human beings. I think Koornhof has a great love for his country and believes it has to be a country for all people. Naturally, this is the position a South African ambassador would want to present in the U.S. . . . but I've had too many meetings with him to believe this was a pose for diplomatic reasons."

True to his behind-the-scenes strategy, however, Koornhof has resisted the temptation to demonstrate his sincerity on television, preferring, when an appearance is necessary, to delegate the task to an aide with a lower profile.

"By going on television, you think you're doing a heck of a favor and all you do is compound the thing," he explains. "Even if you are as good as you can be, you still compound the bad news. What they are waiting for and looking for is not how bright you are or glib of tongue. They want to see the end of apartheid. They want a bloody non-racial democracy, and you're not bringing that. And the more they see you, the more you emphasize that.

"It is almost like the devil being just as good as he could be, telling people he's not the bloody devil." IRONICALLY, THE SAME DEVELOPMENTS that have made it easier to represent South Africa in the United States might be disorienting for the ambassador when he returns home. The country he's going back to is very different from the one he left -- and to some extent, events there are passing people like Koornhof by.

De Klerk has leaped past the "liberal" position Koornhof used to represent. Mandela is the focus of attention. Another sign of the times is the choice of Harry Schwarz -- a Jewish member of the opposition Democratic Party who fled Europe in the '30s -- to take Koornhof's place as ambassador.

Among black South Africans, the changes are seen as evidence that a decade of sanctions, guerrilla attacks, strikes, boycotts and insurrection forced whites to negotiate. Professed reformers like Koornhof do not figure in their strategic calculus.

Even to many whites, the changes people like Koornhof won seem small compared with the sweeping reforms made by de Klerk this year: the unbanning of the ANC and the South African Communist Party, the freeing of political prisoners, the start of negotiations, the opening up of the National Party to blacks.

What, then, of history's verdict on Piet Koornhof? Chances are it will not be what he would wish.

Says former U.S. ambassador Edmondson: "I suppose in his own terms and in his own time and place, he was a liberal, but never completely. It has never been clear to me whether he was willing to go the extra mile to change things." What's more, most black South Africans view his entire career as irrelevant, regardless of any extra miles he may have logged.

It's not a judgment Koornhof is prepared to accept.

"That is just not the case," he says. "That is not true. At best it is a half truth. You have no idea what went on behind the scenes. It was very difficult. Impossibly difficult. And now to think that was all for nothing? It's just not on." Steven Mufson covers economic policy for The Post. His book Fighting Years: Black Resistance and the Struggle for a New South Africa was published in November by Beacon Press.