At the final White House meeting of the President's Commission on Strategic Forces a week ago, Alexander M. Haig Jr. leaned over to national security adviser William P. Clark and Defense Secretary Caspar W. Weinberger and said, "You see, my guerrilla is still here, and he's alive and well."

He was referring to White House chief of staff James A. Baker III, Haig's nemesis in his volatile year and a half as secretary of state, whom Haig had once labeled a "guerrilla in the White House." Clark laughed at Haig's quip, recognizing the serious point that lay behind it.

It touched on a festering problem at the top of the Reagan administration, one that may profoundly influence the outcome of President Reagan's efforts to continue his military buildup, win congressional approval for deployment of the MX missile, and bolster anti-communist forces in Central America. As the president battles with Congress on these and other national security and foreign policy issues, Clark and Baker have emerged as rival architects of competing strategies to accomplish Reagan's goals.

In this competition, Clark is the inside operator who contends the president can advance his agenda best by defining it sharply and repeatedly, even at the expense of appearing excessively militant. Baker, more evidently a political person, believes Reagan can make greater gains by reaching out to Congress and demonstrating he is flexible and willing to make concessions.

It is a match between two soft-spoken attorneys whose courtly manner masks a highly competitive approach to their work in the White House. They share similar conservative goals, but their methods of achieving them are quite different, according to senior administration officials who discussed the rivalry last week on condition they not be quoted.

These officials point out that Reagan has delegated much authority to both Clark and Baker, so the rivalry has significant consequences for Reagan's policies. This was demonstrated two weeks ago when the president, tugged in different directions by the rivals' staffs, failed to move on an attempt to strike a defense spending compromise with Congress until it was too late.

The rivalry is of particular importance now because Reagan, after two years of emphasizing domestic economic issues, is giving top priority, for now, to national security matters.

An official appraising Reagan's political future said it was important for the president to deal with such potentially divisive issues as El Salvador and the defense budget before the 1984 campaigns begin. Another official said presidents inexorably become engaged in foreign policy during the third year of their terms, usually after becoming frustrated in trying to push their domestic programs through Congress.

"There's a natural evolution in presidencies toward foreign affairs," the official said. "There are fewer restrictions there. A president can suddenly see that maybe he will find an easier path in foreign affairs than domestic affairs."

This shift has altered the balance of power in the high councils of the Reagan White House. Deputy chief of staff Michael K. Deaver, whose authority stemmed from his personal closeness to Reagan and his control of the schedule, no longer determines how much time the president spends on national security affairs.

Deaver, an ally of Baker and a critic of Clark, was quoted by an official as complaining the other day that Clark was so dominating the president's schedule that "he has six ambassadors waiting in the hallway to see Reagan right now."

These days, as the recent conflict on defense budget strategy suggests, the major battles are between Baker and his chief deputies, notably presidential assistant Richard G. Darman, on one side, and Clark and his deputy on the National Security Council, Robert C. McFarlane, on the other.

White House counselor Edwin Meese III, bruised by his own past encounters with Baker and Deaver, has become a low-profile adviser who has solidified a long, personal relationship with Clark.

Weinberger, who became Reagan's finance director in California partly because of Clark's urging, also is a firm ally of the national security adviser.

"Cap is Clark's friend, and the two of them have chosen to draw a line in the sand," one official said.

In the eyes of Baker and his deputies on the first floor of the West Wing of the White House, Clark--and Weinberger--are long on ideology and understanding of the president and short on appreciation of the difficulties of mobilizing American public opinion and Congress behind Reagan's programs. Clark's critics say he lacks political realism and develops policies in a vacuum, without consulting other White House officials.

In the basement offices where Clark presides over the national security apparatus, Baker and Darman are believed to be imbued with the idea that Reagan will be seen as "a jingoistic warmonger" if he speaks out on national security issues and talks candidly about U.S.-Soviet confrontation. Baker's critics give him high marks for political acumen but complain that he has little understanding of, or interest in, weapons systems or strategic defense needs.

The Baker people regard Clark and his aides as too ideological and unwilling to confront the consequences of rigidity. Some on the Clark side suggest that Baker and Darman have pursued agendas of their own and created a problem for the president by leading Republican senators to believe Reagan is more willing to compromise than he really is.

These are the caricatures created by the rival camps. While some administration officials acknowledge there is a ring of truth to them, the reality is more complex.

Clark, for instance, has shown concern for the necessity of building a political coalition behind the MX missile. Baker, who is sometimes portrayed as having no ideology, agrees with Clark on the necessity of preventing another communist regime from coming to power in Central America.

Baker, 52, has played a public role as a campaign adviser to President Ford and George Bush and as an unsuccessful candidate for attorney general in his native Texas. But Clark, 51, is a private, behind-the-scenes person whose deliberate near-invisibility as national security adviser has been a source of complaint in other quarters of the White House.

Clark rarely allows himself to be quoted and makes only an occasional public speech. He is a California rancher who attends Mass every Sunday and who shares the president's unrelenting anti-communist views. Reagan is said to trust him completely and has, over the years, used him as a trouble-shooter on matters of importance.

Last December, Clark thought seriously of returning to his ranch, and talked to Reagan about resigning. The president asked him to stay.

Reagan's trust in Clark goes back to the first year of his California governorship, when his staff was shaken by a scandal. Clark reorganized the staff to the satisfaction of both Reagan and his wife, Nancy. Clark subsequently became a controversial Reagan appointee to the California Supreme Court.

The Reagans sought and received Clark's advice during the 1980 presidential campaign, when they were preparing to replace campaign manager John P. Sears. After Reagan was elected and relations between the White House and Haig became a problem, Reagan and Meese asked Clark to quit the California court and join the State Department as part of an effort to keep watch on the mercurial Haig.

When national security adviser Richard V. Allen left during another controversy, Reagan tapped Clark to replace him. Clark later was said to have played a key role in the events leading to Haig's resignation.

Clark is so close to Reagan that other White House officials are reluctant to challenge him openly. Soon after Clark's appointment as national security adviser, one administration called a veteran California politician and asked his view of Clark.

"It's said that Reagan loves Deaver like a son but he treats Clark like a brother," the politician replied. "Don't get in his way."

Although the competition between Clark and Baker has been simmering for months, it came to the fore during the critical negotiations with the Senate Budget Committee over defense spending. The committee voted April 7 to give Reagan only a 5 percent increase in military spending after inflation in fiscal 1984, which begins Oct. 1, instead of the 10 percent the president sought.

In the final hours before that vote, there was a crucial and mysterious gap in communications between the Baker and Clark staffs over whether Reagan would compromise, and by how much. Senate Budget Committee Chairman Pete V. Domenici (R-N.M.) had reluctantly delayed the committee's vote for three weeks to give the White House time to come up with a compromise position on defense. But after the Easter recess, Reagan was still firm in his demand for a 10 percent increase.

Some White House officials working with Baker realized that if Reagan didn't offer a compromise before the vote, his request would be repudiated. "We had to get down to the brass tacks and put the numbers on the table," one administration official recalled.

Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) was particularly insistent that Reagan make a compromise offer of less than an 8 percent increase in defense spending.

But it wasn't until the last day that Reagan tentatively agreed to two compromise suggestions, according to administration sources. One, called the Tower-Clark option, was similar to Senate Armed Services Committee Chairman John G. Tower's (R-Tex.) suggestion for an 8 percent increase. The other, by Howard Baker, which was supported by James Baker, called for a 7.5 percent increase.

But, in a revealing delegation of authority, Reagan made both compromise offers conditional on Weinberger's approval. This condition was supported by Clark, officials said.

About midday, according to all accounts, Office of Management and Budget Director David A. Stockman delivered to Clark the dollar figures for each option, and Clark wired them to Weinberger at the Pentagon.

At this point, the accounts diverge. James Baker and his staff were under the impression that Weinberger would take responsibility for choosing an option and relaying the decision to Domenici. But Clark and his staff were anticipating that Baker's people would carry word to the senator.

An hour before the voting began--as Domenici's committee was moving to repudiate Reagan's defense budget--White House officials on both sides began to get nervous. Baker tried to reach Weinberger by telephone. Clark asked Baker's deputy, Darman, "What is the story?" Darman did not know, either.

Shortly before the committee vote, Weinberger was located elsewhere in the West Wing and was brought to the Oval Office. The defense secretary was sanguine about the prospect of defeat, saying the budget resolution was non-binding and the money could be recovered later in other committees. Others in the room, however, including Baker and Darman, were distressed at a losing a vote they knew would be difficult to reverse.

"I remember the White House photographers were in there and, with the looks on different faces, were going wild," one official recalled.

It was clear then that the compromise numbers had not gone to Domenici as everyone had assumed. It also was clear that in the critical hours before the vote, neither Baker nor Clark had taken charge of the negotiating process or made certain that an offer was presented to the Senate committee.

A rescue was attempted, fruitlessly. Weinberger, heeding the letter but not the spirit of Howard Baker's suggestion that a compromise be less than 8 percent, would yield only to an offer of 7.9 percent.

Reagan then called Domenici, reaching him just minutes before the vote. But the 7.9 percent offer only further antagonized the senator, and he quickly led the committee to vote for a 5 percent increase instead.

This decision may ultimately be reversed in the Republican-controlled Senate. But the setback for Reagan illustrates the depth and impact of the conflicts between William Clark and James Baker and their camps.