A sweeping new free trade agreement between the United States and Canada will create the world's largest open market, eliminating all tariffs between the two countries by 1999 and easing other Canadian restrictions on a whole range of U.S. products, administration officials said yesterday.

President Reagan hailed the pact, reached Saturday just minutes before a midnight deadline, and said it "will serve as an important model for other nations seeking to improve their trading relationships" with each other.

The agreement must be approved both by Congress and the Canadian Parliament.

The trade pact was reached after 16 months of hard bargaining capped by two days of marathon Cabinet-level negotiating sessions. As recently as 11 days ago, the agreement appeared doomed when Canada walked away from the table. Just two hours before the deadline Saturday night, Canadian Trade Minister Pat Carney said both sides were convinced there was no chance of reaching an agreement.

"This historic agreement will strengthen both our economies and over time create thousands of jobs in both countries," Reagan said in a statement.

Reagan said the agreement "will provide enormous benefit for the United States. It will remove all Canadian tariffs; secure improved access to Canada's market for our manufacturing, agricultural, high technology and financial sectors, and improve our security through additional access to Canadian energy supplies. We have also gained important investment opportunities in Canada and resolved many vexing trade issues."

The agreement addresses a major complaint of U.S. auto makers and auto parts suppliers by blocking foreign auto companies, especially those in Japan and South Korea, from using Canada as a duty-free jumping-off point for U.S. sales.

The agreement also deals with major agricultural problems that have arisen between the two nations. It eases Canadian import restrictions on wheat, grain and poultry products, and removes transportation subsidies provided by Canada for grain shipped to the United States.

In the energy area, the United States will allow Canada to take oil from Alaska's North Slope, and both nations agreed to end import and export restrictions.

"We have achieved a win-win solution, clearly beneficial to both countries," said Finance Minister Michael Wilson, who headed the Canadian negotiating team. He called the pact "a powerful signal against protectionism and for trade liberalization."

U.S. trade officials spent much of yesterday briefing key members of Congress, whose support will be needed to ratify the pact. Congressional aides complained that the briefings were vague, one describing them as "broad on generalities, narrow on details."

Because of the lack of specific information, key lawmakers were reluctant to comment on the agreement. Senate Finance Committee Chairman Lloyd Bentsen (D-Tex.), whose support is crucial for congressional approval, said, "It's impossible to arrive at any conclusions other than to say it has to be an agreement that benefits both sides."

Treasury Secretary James A. Baker III, who headed the American team along with U.S. Trade Representative Clayton K. Yeutter, said the talks ended with "an agreement in principle" that will be fleshed out over the next few days and presented to Congress within a month. "We still have to cross some t's and dot some i's. We are continuing to clean up loose ends," Baker said.

The administration has 90 days to get legislation to Congress, which then has another 90 days to either vote it up or down.

In Ottawa, Prime Minister Brian Mulroney, who first proposed the agreement to Reagan 19 months ago, briefed his Cabinet. Wilson, at a news briefing here, predicted that Canada's 10 provincial premiers, who have the power to thwart key elements of the deal, will go along with the agreement.

The free trade agreement has become a major issue in Canada, where workers feared it would cost them jobs and cultural nationalists worried that it would lead to greater economic domination by the United States. Three attempts to achieve a free trade agreement have failed in the past 100 years, twice because of Canadian fears of annexation or economic domination.

The critical issue for Canada was the creation of some shelter from U.S. unfair trade laws, which the Mulroney government complained were being applied capriciously in an effort to harass Canadian imports. Canada had demanded a binational tribunal with binding powers to deal with all trade disputes.

The Reagan administration said it could not go that far. Instead, both sides agreed to the creation of panels that would replace judicial review of decisions by U.S. and Canadian authorities on trade complaints.

Hill experts, briefed on that segment of the agreement by the administration, raised constitutional questions, which Baker brushed aside in a press briefing last night