President Reagan's statement that the South African government of Pieter W. Botha is "reformist" and that "they have eliminated the segregation that we once had in our own country . . ." is more than a classic case of his unsure handling of the facts. Reagan's declarations echo a long history of conservative thinking on South Africa, a history marked by ideological uncertainty.

The conservatives' ambivalence toward South Africa has complicated the Reagan administration's efforts to present a convincing public rationale for its policy of "constructive engagement" and has produced a bitter split among conservatives over the issue of economic sanctions.

While the president has planned a fall political offensive centering on tax reform, his statements on South Africa are certain to intensify the heated debate on South Africa that Congress will take up again early next month, when economic sanctions will be considered.

"When the president should have the decks clear for combat on tax reform, he has put himself in a vulnerable position. His slogan is 'Don't rock the Botha,' " said Christopher Matthews, press secretary to House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.).

Reagan's predicament is the latest skirmish in the conservatives' own protracted Boer War over South Africa. In the early 1960s, American liberals and conservatives alike made pilgrimages to South Africa. The liberals, like the activist Allard Lowenstein, were filled with outrage. The conservatives were often filled with equivocations.

In 1963, William F. Buckley Jr., editor of the conservative National Review, published his extended reflections on a visit to South Africa. Buckley wrote that he did not "approve of apartheid" but added that "immediate integration must be rejected by all realistic men as suicidal." The South African prime minister, Hendrik Verwoerd, he wrote, "means to help the blacks." He described apartheid as a method of reform, a way for whites to uplift the backward Bantus -- "a sincere people's effort to fashion the land of peace they want so badly."

But few conservatives were deeply involved in the South African issue. There were conservative groups specifically devoted to Latin America and to Asia, but not to Africa. "Africa has tended to be down on the list," said Bruce Weinrod, director of foreign policy at the Heritage Foundation.

Among the occasional articles on the subject in conservative journals was a notable piece in 1976 by William Rusher, publisher of the National Review, attacking the "realists" who saw trouble ahead in South Africa. Rusher envisioned a South Africa armed with atomic weapons and threatened by the Soviet Union: "There will be brave and resolute white men alive and well in South Africa when the last armchair 'realist' is a painting on the wall," he wrote.

One conservative who apparently was very interested in South Africa was the columnist and now White House communications director Patrick J. Buchanan, who tried to be appointed ambassador there when Gerald R. Ford became president. Ford instantly rejected the idea, according to Robert T. Hartmann, Ford's aide.

In Buchanan's columns, he strongly argued that mineral-rich and geographically strategic South Africa is crucial to American interests in the East-West struggle. "The sole mortal menace facing the West today, the one that calls for unity for survival, is the Soviet Union," he wrote.

Surveying the African continent, Buchanan saw black turning red. And Western diplomats, "paralyzed with guilt over our colonial past, . . . acquiesced in silence, or even applauded, as independent Africa charted the course to its own destruction." The United States, he said, should not be critical of de facto allies "simply because they do not meet our democratic standards . . . ."

On the eve of Reagan's presidency, conservative theorists tried to formulate an approach to South Africa that would reconcile anticommunism and democracy. Writing in Commentary magazine in 1980, Jeane J. Kirkpatrick, who became ambassador to the United Nations, argued that, by pursuing human rights, the Carter administration had undermined "authoritarian" regimes, like Nicaragua's, in ways that benefited the hostile and "totalitarian" Soviets. South Africa fitted into the "authoritarian" category.

At about the same time, Chester A. Crocker, writing in Foreign Affairs, said that under Botha, South Africa's new prime minister (now its president), "prospects for political change have opened up." Through a policy of what Crocker called "constructive engagement," the United States could help Botha and his political allies create a society based on "power sharing" with blacks. The reformists in South Africa, in Crocker's view, were now in power. He was named assistant secretary of state for African affairs, and "constructive engagement" became official policy.

At long last, it seemed that the conservative dream for South Africa might be possible. "We hoped that the South Africans would come up with a miraculous solution, and then we could have it both ways," said Charles Lichenstein, a senior fellow at the Heritage Foundation and former alternate U.S. delegate to the United Nations.

But in South Africa this year, those hopes were soured. As a watchword, "constructive engagement" was replaced by "state of emergency." Botha quietly promised reforms to U.S. officials, then delivered a speech promising no change.

Reagan reacted by minimizing the new difficulty, even when some of his aides privately wanted him to react more strongly. Instead he reached for familiar formulations, again insisting that the situation in South Africa was better than the critics realized. In declaring much of apartheid "eliminated," he described a reality that fit his policy, if not the realities of South Africa.

In the past, Reagan's factual mistakes haven't wounded him politically, perhaps because many Americans have agreed with his larger point and were not distracted by his incorrect details. But Reagan's view of South Africa as "reformist" not only is unpopular, but is sharply disputed even by some of his fellow conservatives. Many staunch Reagan supporters among Republican members of the House oppose his policy and favor the economic sanctions that the president may well veto if passed by Congress.

"South Africa has the potential of displacing Reagan's agenda," said Mark Johnson, a spokesman for the Democratic Congressional Campaign Committee. "He's not in control -- that's the bottom line."

Reagan has shown a Houdini-like ability to escape from entanglements of his own creation. But South Africa may be unlike the Bitburg cemetery affair -- a three-week, largely self-manufactured symbolic flap. The president has now identified himself with one side in the seemingly intractable South African crisis. His touted public relations campaign for tax revision must now compete with a real news event, televised nightly, into which he has inserted himself, but which he does not control.