The United States and New Zealand hailed new cooperation in a once frosty relationship as President Barack Obama called for work on a trans-Pacific trade deal by November.

Obama welcomed New Zealand's Prime Minister John Key to the White House on Friday, hours after deadly attacks stunned Norway -- an occasion for the two leaders to highlight their nations' work together in Afghanistan.

"If it is an act of global terrorism, then I think that what it shows is no country, large or small, is immune from that risk," Key told reporters as he met Obama in the Oval Office.

"And that's why New Zealand plays its part in Afghanistan as we try and join others like the United States in making the world a safer place," he said.

New Zealand has sent 70 elite special force troops and 140 reconstruction personnel to Afghanistan, where US-led forces have been fighting since the September 11, 2001 attacks. The war has been increasingly unpopular in both the United States and New Zealand, with Obama beginning to reduce troop levels.

Military issues have been a sore point between the two countries. The United States severed its treaty commitments to defend New Zealand in 1986 after the staunchly anti-nuclear country barred entry to US atomic warships.

Obama hailed New Zealand and Key as an "outstanding partner," although he twice pronounced the prime minister's name as "Keys."

"Obviously, we are very pleased that the relationship between New Zealand and the United States is growing stronger by the day," Obama said.

Key visited Washington as Obama was embroiled in talks with Congress on avoiding a debt default. The two leaders focused on economic issues and threw support behind the Trans-Pacific Partnership, a proposed free trade pact among nine nations spanning the Pacific Rim.

Obama said that the United States and New Zealand have "a great interest in promoting a more effective trade regime among the Asia-Pacific nations."

"We hope to have a framework agreement by the time that we go to Honolulu for the APEC meeting," Obama said, referring to an Asia-Pacific meeting he will host in November.

Key, a former foreign exchange dealer and supporter of free trade, said the Trans-Pacific Partnership would deliver economic growth and jobs.

"We're excited about the chance to put together a regional trade deal which includes the United States and which can expand over time beyond the nine countries," Key said.

The Obama administration has billed the Trans-Pacific Partnership as a new genre of trade deal that pays attention to labor and environmental standards.

Obama had been a critic of trade deals negotiated during George W. Bush's presidency with South Korea, Colombia and Panama. His administration renegotiated the pacts and now supports them, but has struggled to win congressional approval.

The president has set a goal of doubling exports to spur growth in the troubled US economy. But the AFL-CIO, the largest US labor confederation and usually a supporter of Obama's Democratic Party, opposes the trade pacts and argues they benefit corporations instead of workers.

Even some supporters of free trade have criticized the Trans-Pacific Partnership.

Lawmakers from US farm states are concerned about reducing tariffs on dairy products, fearing stiff competition as New Zealand is the world's largest dairy exporter.

At an APEC summit in Japan last year, leaders agreed to aim to complete the Trans-Pacific Partnership by the Hawaii meeting. Key said Thursday that he hoped for a strong statement of principles, adding that a final deal was not possible by November.