President Reagan defended free trade Saturday, denouncing "demagogues" who "cynically" wave the American flag while preparing to start a trade war with U.S. allies by raising protectionist barriers.

In harsh language, the president used his weekly radio broadcast to accuse "demagogues" - presumably Democratic supporters of some trade barriers - of weakening the economy and jeopardizing national security."We should beware of the demagogues who are ready to declare a trade war against our friends - weakening our economy, our national security, and the entire free world - all while cynically waving the American flag," Reagan said.

The president praised the reelection this week of Canadian Prime Minister Brian Mulroney, saying it "sent a strong message" rejecting protectionism and reaffirming support for the new U.S.-Canadian Free Trade Agreement.

The Canadian election became a referendum on the free trade agreement with Mulroney's opposition arguing that Canada would become a 51st state in the United States without any trade barriers.

"Protectionism is being used by some American politicians as a cheap form of nationalism, a fig leaf for those unwilling to maintain America's military strength and who lack the resolve to stand up to real enemies," Reagan said.

Delivering the Democratic response to Reagan's radio address, Rep. Bill Gray, D-Pa., agreed that "protectionism is not the answer to our trade deficit."

"We need open trade but we also need fair trade and a level playing field," Gray said, adding the difference in a trade surplus in 1980 to a $154 billion deficit last year "illustrates how we can misuse our bountiful resources."

"Everyone knows that it's now time to deal with the budget deficit," he said.

The president said the American people have rejected "the siren song of protectionism" over the years and promised that the United States will lead the way in dismantling more barriers when the multilateral trade talks open in a week in Montreal.

"We want to open more markets for our products, to see to it that all nations play be the rules ... and to bring the benefits of free trade to new areas," the president said.

Reagan has just about completed work on the final budget he will submit to Congress for the 1990 fiscal year. The spending blueprint will include cuts of $35 billion to $40 billion to meet the Gramm-Rudman requirements to reduce the deficit to $100 billion in the next fiscal year, a White House aide said.

Reagan's last budget will contain no new taxes and no cuts in Social Security while defense spending will amount to 2 percent over inflation, the aide said.

Gray, in his Democratic response, called on Reagan and President-elect George Bush to submit to Congress by January a budget reflecting the president-elect's agenda.

"That is what the nation and the world are waiting for," Gray said. "The new president's vision and program, which is the essential basis for the budget deliberations and action by the Congress."

Reagan was winding down his Thanksgiving holiday stay at his Santa Barbara ranch and planned to fly back to Washington Sunday. His son and daughter-in-law Ron and Doria kept him company while he did his usual chores at the wind-swept mountaintop ranch.

Reagan's vacation stay at the ranch was his last as president. He has spent 345 days at the ranch in his eight years in the White House.

When he returns to the 688-acre spread next year after Bush takes over the Oval Office, much of the communications and other special services provided by the federal government will be gone.

There will be some dismantling of government facilities and installations, but a couple of trailers put in for the Secret Service will remain since the agency will continue to protect the President and Mrs. Reagan for the rest of their lives.

Reagan, whose aides are working hand in hand with Bush to make a smooth transition, also will have his regular Thursday luncheon meeting with the vice president to talk over future plans.