WASHINGTON — Montenegro, a valuable ally of NATO in terms of stability in the western Balkans, joined the Western alliance as its 29th member in a ceremony in Washington, D.C., on Monday.

Its accession into NATO marks the first expansion into ex-communist Eastern Europe since Montenegro's neighbors, Albania and Croatia, joined in 2009.

NATO Secretary-General Jens Stoltenberg emphasized Montenegro’s importance for promoting solidarity in the Balkans and commended it for previous efforts in Afghanistan.

"NATO benefits from Montenegro’s insight into the Western Balkans and the professionalism, bravery and dedication of its men and women in uniform, troops who serve with our Resolute Support Mission in Afghanistan," he said.

U.S. Under Secretary of State Thomas Shannon also praised Montenegro for its six years of contributions to the NATO operation in Afghanistan and for joining NATO in the face of what the alliance perceives as Russian aggression.

"Montenegro should be commended in particular for asserting its sovereign right to choose its own alliances even in the face of concerted foreign pressure," Shannon said at the ceremony.

As Montenegrin Prime Minister Dusko Markovic was in Washington for the ceremony, Russia warned of retaliation against his nation’s "hostile course" and condemned its "anti-Russian hysteria," according to Reuters.

Russia has threatened the ex-Yugoslaic nation before, notably in 2014 when the small coastal nation participated in European Union sanctions against Russia.

"In the light of the hostile course chosen by the Montenegrin authorities, the Russian side reserves the right to take retaliatory measures on a reciprocal basis," Russia's Foreign Ministry said in a statement.

Markovic did not meet with U.S. President Donald Trump while in Washington, but the two did connect last month when Trump pushed asidethe prime minister at the NATO summit, the same summit where he urged NATO allies to spend more on defense. Since then, the government of Montenegro called the incident"an inoffensive situation."

Markovic addressed the topic of defense spending in a meeting with U.S. Vice President Mike Pence. Markovic said Montenegro will meet the goal of spending 2 percent of its gross domestic product on defense by 2024.