When Deborah Szekely was named president of the Inter-American Foundation last fall, liberals viewed the conservative California spa owner as a lightweight who would politicize the nonpartisan aid agency.

Last week she proved everybody wrong. With support from both liberals and the Reagan administration, she handily defeated a move to oust her sponsored by two board members who are even more conservative than she.

The outcome appeared to defuse, at least for the time being, a long-running controversy over the foundation's alleged political bias by affirming Szekely's assertion that there will be no bias. It also derailed an apparent effort by Board Chairman Victor Blanco and Vice Chairman Harold K. Phillips to assert the board's control over the IAF's operations.

"They thought they controlled me and they didn't," Szekely said in an interview last week. "We don't differ [politically] in essence. It was just a matter of understanding our different roles."

Szekely's tenure began 10 months ago amid controversy over her background in politics and international aid, which was limited to the generous Republican campaign contributions she had made as founder and president of The Golden Door weight-loss spa in Escondido, Calif.

Blanco and Phillips are California businessmen whose appointments created a Reagan majority on the board, which had hired Szekely after it fired her predecessor, Peter Bell, in December 1983 for what it called reasons of "chemistry." But the board had complained that the IAF was funding too many left-leaning groups and projects in Latin America.

Founded in 1969, the IAF seeks out and backs small, locally originated projects rather than going through governments as does the Agency for International Development. Last year, it spent $23.3 million, half appropriated by Congress and half from a fund managed by the Inter-American Development Bank.

Last January, the IAF's vice president for research, Peter Hakim, resigned, telling Szekely and the staff he was "deeply concerned" about "the growing influence of partisan politics and ideology in foundation affairs." The IAF resumed activity in El Salvador. In the past in Chile, "we've ignored the poor people and funded the leftist opposition," Phillips said in an interview. Now, he said, "It is not that we want to fund the right, but that we want to get away from political involvement."

In May, Szekely testified before the House Appropriations subcommittee on foreign operations that Phillips had been "sort of insinuating" that some members of her staff were communists. "He has absolutely no justification," she added, according to a transcript. "I have told him when anything like that comes up, I say you are doing no one a service."

Phillips called those charges "absurd." The staff, he said, is primarily academicians with "a very narrow perspective" and should include more private-sector people.

"In the past the IAF has promoted a conflict between poor people and wealthy people, and that is counterproductive . . . . The staff doesn't have a clear understanding of how money works," Phillips said.

Szekely said that after she was pressured to fire or transfer one 12-year IAF field officer whose politics had been questioned, she "promoted" him to a "management" job in Washington.

Blanco said in an interview that he had requested the transfer for performance reasons, "not because of ideology." He echoed Phillips in saying his goal had been to make the staff more effective in helping Latin America's poor. Szekely, he said, was "very enthusiastic and motivated but she got very poor advice and ignored the need for partnership with the board."

Szekely's testimony apparently ignited the effort to oust her. She "was basically totally unresponsive," Phillips said. "She just ignored the board of directors."

Steve Hellinger, codirector of the Development Group for Alternative Policies, a liberal organization that had been critical of Szekely, said Szekely's defense was an offensive. "Her back went up and she rallied her political forces," he said. "We still had problems with what was going on inside, but the real danger was from the outside."

The chairman of the IAF advisory board, Augustin S. Hart Jr., wrote Blanco on June 13, saying he was "troubled by the information that was revealed concerning board conduct" at the May hearing.

The IAF staff also prepared a 12-page report on Phillips' activities that was delivered to the six other board members as they convened to decide Szekely's future. The report said Phillips' outside political work "has compromised the trust and credibility" of the IAF and "could increase the risks of personal harm to staff members" who might be branded with Phillips' views.

"It's not the staff's role to criticize the actions of the board," Phillips said. "I will continue to travel and I will continue to support the president of the United States." He and Blanco both said previous board members had made similar trips.

At the closed-door meeting, Blanco and Phillips, evidently realizing they had no support for their move to oust Szekely, voted to table their motion. A member opposed to Szekely's firing, Luis Nogales, voted to discuss it in order to air the issue, he said. The other Reagan administration appointees -- Lynda Barness; M. Peter McPherson, Agency for International Development administrator, and J. William Middendorf II, U.S. Ambassador of the Organization of American States -- made up the 5-to-1 majority.

Szekely said, "Everything's fine now," and added she does not think Phillips and Blanco had any administration backing for their effort to oust her. "If they'd had, they would have planned it better," she said.