The U.S. military says an Air Force RC-135 veered into Swedish airspace as it attempted to avoid an encounter with Russian planes over the Baltic Sea. (Master Sgt. Adrian Cadiz / Air Force)

BERLIN — The U.S. military says one of its reconnaissance aircraft mistakenly veered into Swedish airspace as it attempted to avoid an encounter with Russian planes over the Baltic Sea.

The Scandinavian country is not a member of NATO, and American military planes require permission to enter its airspace.

U.S. European Command said the Air Force RC-135 was incorrectly directed on July 18 toward Swedish airspace when the crew “detected the attempted encounter” by Russian aircraft and exited the airspace once Swedish air traffic controllers informed them of the error. It declined to give further details.

The Swedish Foreign Ministry said Monday that it has carried out discussions over the issue but wouldn’t give details.

NATO has boosted its presence in the countries bordering Russia following the Ukraine crisis.