VILNIUS, Lithuania—The North Atlantic Treaty Organization established its first permanent outposts next to Russia on Thursday in a step to shore up defenses along the alliance’s eastern flank.

A small command post was inaugurated in Vilnius along with posts in five other NATO members from the former Soviet bloc. The move to build an alliance presence along the Russian border has rankled Moscow, but NATO leaders hope it will deter President Vladimir Putin from stirring unrest.

The...