The foreign policy victory President Reagan won yesterday in the Senate gave him and his administration a badly needed shot in the arm just at the time when the weakening economy was beginning to erode his political support.

Using his personal powers of persuasion to top off a high-powered lobbying effort that reversed a probable defeat on the sale of AWACS (airborne warning and control systems) aircraft to Saudi Arabia, the president averted a loss that friends and foes both said would have damaged his standing in Congress and perhaps in the country.

Both polls and politicians said that AWACS was not a major issue across most of the country, News Analysis News Analysis "not even close to interest rates," said Ody Fish, the veteran Republican national committeeman in Wisconsin.

But Reagan's popular support now rests largely on his reputation as an effective, can-do leader, and with increasing evidence of nervousness in GOP congressional ranks about his economic program, a loss on AWACS might have unraveled the party support he needs for the critical budget and tax votes ahead.

That is why, an aide said, "Once the president was fully committed on this issue we could not afford to lose the fight."

Winning it, particularly when defeat seemed almost inevitable 48 hours before the vote, had immediate benefits for Reagan. Speaker of the House Thomas P. (Tip) O'Neill Jr. (D-Mass.) called the turnaround "amazing," and said Reagan was showing "awesome power."

On the face of it, the narrow victory a Republican Senate gave the Republican president was not "awesome." But this issue had split the parties, and Reagan had to work hard to pull his troops back into line. When the House voted on the same issue two weeks ago, Republicans voted 108 to 78 against the president's position.

Recognizing the inevitability of that outcome and knowing that a victory in the Senate would be sufficient to save the transaction from congressional veto, neither the White House nor the House GOP leadership put pressure on House Republicans.

The lopsided House vote (301 to 111) against AWACS sent shivers through Reagan's lieutenants.

"Once the president is beaten," said Jim Cannon, an aide to Senate Majority Leader Howard H. Baker Jr. (R-Tenn.), "everyone knows it is possible to beat him again.

"It's a psychological thing," he said. "Winning AWACS does not mean we can now pull together the support we need for the next round of budget cuts. At best, that is a helluva fight. But it would have been a helluva lot harder if we had lost today."

In a similar vein, Republican pollster Robert Teeter said the AWACS win "will probably produce two or three weeks of stories about the president being strong and in command, and that will offset the stories we've had since August about his being in all kinds of trouble."

Ultimately, the pollsters and politicians agree, the ability of the administration and Republicans to address inflation, recession and high interest rates will be much more important to the 1982 and 1984 elections.

The AWACS sale stirred high emotions, Iowa Democratic Party executive director John Law said, "in the Jewish community, among liberals and anti-armaments people, but not in the mainstream."

"It was not exactly a Superbowl Sunday issue in Sedalia, Mo.," Missouri Democratic Chairman Thomas Guilfoil agreed.

Potentially, Reagan was on much more dangerous political ground last summer, when the House and Senate, in symbolic votes, rejected his calls for cuts in some promised Social Security benefits. But he sidestepped that issue by giving ground to his opponents later.

By contrast, and, clearly, for foreign policy reasons, Reagan fought on AWACS. It was his willingness to risk his prestige that gave the vote its political importance.

Many of his predecessors were overruled by Congress on foreign policy issues. And in almost every case, the loss both reflected and contributed to a significant decline in their domestic political standing.

That was true of President Ford on issues of arms aid to Turkey, Angola and Vietnam, and on Soviet Jewish emigration. It was true of President Nixon on the bombing of Cambodia.

Reagan stands higher in the polls now than his Republican predecessors did when they suffered most of those reverses. But, conversely, his rating after nine months in office was well below that of other presidents at the comparable points in their terms.

If Reagan's reputation as a "powerhouse president" on Capitol Hill had been shattered by the AWACS vote, Democratic pollsters Peter D. Hart and Patrick Caddell both said, his public ratings might have tumbled badly. So he averted a major threat yesterday.

How much he may have won is less certain. Sen. Bob Packwood (R-Ore.), a leader in the losing anti-AWACS coalition, said the president's victory will have little effect on the upcoming budget bills. "He's going to win them or lose them as if we'd never had an AWACS issue," Packwood said.

Reagan prevailed over the "Israeli lobby," which has enjoyed a reputation as the most powerful ethnic interest group in Congress. But, as one leading Democrat noted, when President Carter did the same thing in 1978, on the sale of F15s to Saudi Arabia, the political effect was to drive many Jewish contributors and voters into the arms of the Republicans and Reagan.

Noting that the Democratic Party and most prominent Democrats (except Carter) had opposed the AWACS sale, this Democrat said, "The losers today may be the winners in 1982 and 1984."

In the long run, there may also be some truth in the observation of a Senate Democratic leadership aide that "Reagan has now pinned his domestic policy to the magic of supply-side economics and his foreign policy to the gamble of Saudi goodwill toward Israel . . . . There is no big constituency for either of those propositions."

But, for now, the Republicans were content to exhale after holding their breaths for two months on the Senate vote and to savor the sensation that the erstwhile "king of Capitol Hill" has at least temporarily regained his crown.