The United States and Canada announced an agreement on Thursday to settle a drawn-out and heated trade battle over softwood lumber, a major home-building component.

The U.S. timber industry said it could support the accord, but Americans should not expect a price break from the deal when they pay for their new house.

The agreement was announced late Thursday at a joint U.S.-Canada news conference at the Canadian Embassy.

"This agreement is an historic opportunity to resolve a dispute that has lasted for more than two decades," U.S. Trade Representative Rob Portman said.

Canadian Trade Minister David Emerson called the deal "a watershed moment" in trade relations between the two nations.

Canada's prime minister, Stephen Harper, told a standing ovation in the House of Commons, "This is a deal that resolves the long-standing dispute and allows us to move on."

Harper, who took office in February as the Conservative Party returned to power for the first time in more than 12 years, has sought to resolve the bitter dispute that has strained U.S.-Canadian relations for at least two decades. Harper and President Bush discussed the matter in a telephone call last weekend.

Aboard Air Force One, en route back to Washington from the Gulf Coast, Bush spoke with Harper, according to White House Press Secretary Scott McClellan. The two leaders congratulated each other on bringing the long-running dispute to an end, he said.

Canada's $10 billion in annual shipments to the United States of softwood lumber, which comes from pine and other trees, represent about one-third of the U.S. market.

U.S. tariffs on the Canadian lumber started at an average of 27 percent in 2002, but now average 11 percent because of various reviews and trade panel rulings.

Canada's share of the U.S. market would not exceed 34 percent, according to published descriptions of the agreement. To protect American producers from a drop in prices, Canada would impose an export tax of as much as 15 percent, depending on the market price of lumber.

Analysts said Americans buying new homes probably should not expect a price break from the deal.

"This is all organized to keep competition down and prices high for U.S. producers," said Gary Hufbauer, an economist at the Institute for International Economics, a Washington think tank.

Said Jerry Howard, executive vice president of the National Association of Home Builders: "For an administration that espouses free trade, there is no logical reason to ... engage in one-sided negotiations that would provide a massive subsidy to the U.S. timber industry at the expense of millions of American consumers."

Harper said the deal would lift tariffs and quotas, and mean that $4 billion of the $5 billion in penalties collected by the U.S. on softwood imports from Canada since 2002 would go back to Canadian producers.

Canadian opponents of the deal want all of the tariffs returned to Canadian lumber companies because international trade panels repeatedly have ruled that the U.S. penalties were improper.

"It's outrageous, it's a sellout, it's a crime that the Americans would keep a billion dollars of money that seven decisions have now said they shouldn't have," said Jack Layton, the leader of the opposition New Democratic Party.

Under U.S. law, American companies were awarded penalty fees when they won trade cases against foreign competitors accused of selling products in the U.S. at unfairly low prices. From the U.S. perspective, returning some of the escrowed money from taxes on Canadian softwood amounted to a concession in the bargaining.

Bush administration officials said the fate of the deal, reached Tuesday night but not announced until Thursday, would depend on industry support in both countries.

Neena Moorjani, a spokeswoman for U.S. Trade Representative Rob Portman, said approval could bring stability to the North American lumber market while rejecting could mean "many more years of litigation, acrimony and market uncertainty.

In a statement, the Coalition for Fair Lumber Imports, the U.S. industry group leading the fight against Canadian imports, said it could support the terms as U.S. officials have described.