BRUSSELS — NATO has invited Macedonia to start membership talks, a step toward adding its 30th member despite Russia's objection and a show of unity at a time of growing discord between the Trump administration and Europe.

The invitation Wednesday came at a NATO summit at which U.S. President Donald Trump demanded more military spending by some allegedly deadbeat allies, as countries like Canada and Britain committed more to new manpower than new money.

Macedonia was given a pathway to membership on condition that it finally iron out its years-long standoff over its name with Greece, which took a big step forward with their deal last month that could rename the country North Macedonia.

Macedonian voters and the Greek parliament still must sign off on that deal, which could also dissipate any Greek objections to the Skopje government's ambition to join the European Union.

"Once all national procedures have been completed to finalize the name agreement, the country will join NATO as our 30th member," NATO Secretary-General Jens Stoltenberg said. "It cannot become a member if it doesn't change its name. That's in a way the simple choice, and that's up to the people."

Russia, NATO's most prominent rival, has bemoaned the possible addition of another alliance member — reviving Cold War-style tensions. Macedonia Prime Minister Zoran Zaev hailed the invitation but noted objections from Moscow.

"Very obviously, they are against our integration in NATO," he said during a panel talk on the sidelines of the summit. Zaev alleged "some activities" by Russia had attempted to thwart the deal, but he did not elaborate.

The overture toward expansion came amid a backdrop of strain in NATO, notably continued pressure by Trump on allies to shoulder a bigger share of military spending — including a swipe at Germany for being "captive" to Russia.

Instead of new money, Canadian Prime Minister Justin Trudeau announced his country will lead NATO's new military training mission in Iraq, with up to 250 troops. Canada isn't meeting an informal alliance target for member states to devote at least 2 percent of their economic output to defense spending.

Prime Minister Theresa May of Britain, which is meeting that target, announced it would send 440 military personnel for a similar training mission in Afghanistan — by far the alliance's biggest foreign venture.

The pledges came as NATO has been keen to play a major role in the fight against terrorism and demonstrate its resilience against an aggressive Russia that has annexed Crimea and sown instability in Ukraine.

Canada's offer is part of NATO's attempt to help Iraq rebuild and ensure the Islamic State group can't gain a new foothold there. The commitment was part of the alliance's expansion of the number of trainers from around a dozen currently to several hundred operating out of the capital, Baghdad.

"Those sorts of tangible elements are at the heart of what NATO stands for," Trudeau said, in an apparent bid to outflank Trump's call for money. "You can try and be a bean counter and look at exactly how much this and how much money that, but the fundamental question is: is what you're doing actually making a difference?

The British commitment in Afghanistan came as NATO agreed to fund the Afghan army through 2024. Britain's addition will beef up efforts that are already training some 16,000 troops.

"I think that shows when NATO calls, the U.K. is one of the first to step up," May told reporters.

In another show of resolve to Russia, the leaders rubber-stamped a plan to ready a crisis response contingent that can be rapidly deployed — 30 battalions, 30 air squadrons and 30 battleships within 30 days. It also endorsed two new command headquarters — in Norfolk, Virginia and Ulm, Germany — to help better move troops and equipment across the Atlantic and through Europe.

Questioned repeatedly about Trump's attacks on European allies and Canada, Stoltenberg acknowledged trans-Atlantic differences, but refused to say whether the U.S. leader's attacks were damaging the alliance.

"My task is to make sure that we stay together, so if I started to freely reflect on all possibilities, then I would undermine the unity of this alliance," Stoltenberg said.

Trump's "America First" policies have exposed major differences between the U.S. and many parts of Europe on issues as diverse as climate change, trade and tariff policies, and the Iran nuclear deal that the U.S. leader has rejected.

Stoltenberg sought to depict his alliance as a force for unity that gives Washington a way to project power from Europe into Asia, the Middle East and Africa.

"A strong NATO is good for Europe and good for the United States," he said. "Two world wars and a Cold War taught us that we are stronger together than apart."