MOSCOW — When Russian agents grabbed Frode Berg in front of Moscow’s ritzy Metropol Hotel two years ago, they turned the retired Norwegian border inspector into the symbol of a new Cold War descending on Scandinavia’s Arctic north.

At noon on Friday, Mr. Berg walked free after 23 months in prison on espionage charges, in a spy swap that harked back to the original Cold War. At a border crossing between Lithuania and the Russian exclave of Kaliningrad, Russia released Mr. Berg, along with two Lithuanians convicted of spying. Lithuania freed two convicted Russian spies.

“We are happy Frode Berg is now coming home to Norway, as a free man,” Prime Minister Erna Solberg of Norway said in a statement. “I would like to thank the Lithuanian authorities for their cooperation and for their efforts to free Berg.”

The unusual three-way swap with two NATO allies underscored the Kremlin’s interest in using foreign citizens arrested in Russia to secure the release of its own citizens abroad. Mr. Berg’s Russian lawyer, Ilya Novikov, said the Russian authorities had sought different deals in return for Mr. Berg’s freedom that they were not able to secure.