U.S. troops could be deployed to Canada and Canadian troops could cross the border into the United States if the continent is attacked by terrorists, according to an agreement announced today by U.S. and Canadian officials.

"The aim . . . is simple: to save lives," Canadian Defense Minister John McCallum said in announcing the creation of the so-called Planning Group, a joint task force in which Canada and the United States will work on contingency plans to defend North America.

As an example of a case in which U.S. troops might enter Canada, McCallum cited a hypothetical biological attack in Vancouver. U.S. forces in Seattle might be able to respond faster than Canadian forces in Ontario, he said.

Under the agreement, any U.S. troops in Canada would be under Canadian command, while Canadians crossing the border would be under U.S. command.

The State Department said both countries are convinced that cross-border military cooperation is vital to enhancing the security of the continent. Since Sept. 11, 2001, the department said in a statement, "the overall threat to the North American continent from the air, land and sea has greatly increased, including the potential for the use of weapons of mass destruction delivered by unconventional means, by terrorists or others."

The Planning Group will initially coordinate maritime surveillance and the sharing of intelligence about potential maritime threats. The group will be based at the Colorado Springs headquarters of the North American Aerospace Defense Command (NORAD), which is run jointly by Canada and the United States to detect missiles and warn of attacks from the air against North America.

The agreement has prompted debate here about a potential erosion of Canada's sovereignty. U.S. dominance has long been an issue in this country, which sits next-door to the world's only superpower. But McCallum said there should be little concern. "We are in control," McCallum said, "by putting Canada in a position to work with the United States to defend North America."

Peter Stoffer, who speaks for the opposition New Democratic Party on defense issues, disagreed, saying that the Americans "could walk right over us. Our military is so short of funds and so short of planning."

Canada has long been under pressure from Washington to increase military spending. The country ranks toward the bottom among the 19 NATO countries in terms of military spending as a percentage of gross domestic product, allocating about 1.2 percent in 2000, according to NATO. Last year, a report by a group of retired Canadian military leaders concluded that Canada's military had been so weakened by spending cuts that it could not defend the country in a war.