Sen. Richard G. Lugar (R-Ind.) lost the race yesterday for Senate majority leader but won the chairmanship of the Senate Foreign Relations Committee, a move that is likely to ensure a comfortable working relationship between the committee and the White House.

In a news conference yesterday Lugar said that he has been "a good friend" of President Reagan and that he will try to resolve any problems with the administration quietly.

He said the committee's most pressing concerns in the new Congress will be U.S.-Soviet relations, international debt and Central America.

The chairmanship of the Foreign Relations Committee opened up with the defeat of Sen. Charles H. Percy (R-Ill.), who has headed the panel since 1981.

Under the Senate seniority rules, Sen. Jesse Helms (R-N.C.) was in line to take over the chairmanship if he wanted it. But Helms, making good on a campaign pledge, said yesterday that he will remain chairman of the Senate Agriculture Committee, where legislation vital to North Carolina tobacco farmers originates.

After Helms, Lugar is the most senior Republican on the committee, so the chairmanship fell to him.

Administration officials, especially in the State Department, had been concerned about a Helms chairmanship, considering him unpredictable in his support of the administration's foreign policy and willing to use the committee as a New Right forum.

Lugar is viewed as a team player, a strong conservative unlikely to cause many ripples and expected to keep the committee under control. While displaying streaks of independence, Lugar has been a leader of the committee's mainstream Republicans.

He has supported the administration's efforts to increase defense spending and get tough with the Soviet Union and other communist countries.

During the Carter administration, he was one of the strongest opponents of the SALT II nuclear-arms agreement, which the Senate never ratified. He also opposed the Panama Canal treaties negotiated by the Carter administration and approved by the Senate.

It was suggested yesterday that concern about Helms taking over the Foreign Relations Committee may have been a factor in Lugar's third-place finish in the race for majority leader.

Lugar, 52, is known as a low-key, diligent, intelligent man uncomfortable with the back-slapping style of many politicians.

A former Rhodes Scholar, he is perhaps best known for having been President Richard M. Nixon's "favorite mayor" while mayor of Indianapolis from 1968 to 1976. He earned that accolade, which he says he does not particularly like, for opposing increased federal spending for cities.