ANKARA (Reuters) - Turkey is pulling 40 soldiers out of a NATO exercise in Norway, President Tayyip Erdogan said on Friday, after his name appeared in a list of enemies on a poster at the drill, an incident that drew an apology from both the military alliance and Oslo.

Turkey's President Tayyip Erdogan attends a news conference after the talks with Russia's President Vladimir Putin in Sochi, Russia November 13, 2017. REUTERS/Pavel Golovkin/Pool

Turkey has the second largest army in the alliance after the United States, and it borders Syria, Iraq and Iran, lending it great strategic importance for NATO. But the relationship has become increasingly fractious as Ankara drifts away from the alliance and the European Union, alarming the West.

Erdogan said an “enemy poster”, featuring his name on one side and a picture of modern Turkey’s founder, Mustafa Kemal Ataturk, on the other, was unfurled at the training exercise in Norway, prompting a decision by Turkey’s military chief and European Union minister to pull the troops out.

“They said they had decided to pull our troops out and will do so, so we told them to not stop and go ahead ... take our 40 soldiers out of there,” Erdogan told members of his ruling AK Party in Ankara.

Commenting on the incident at the alliance’s Joint Warfare Centre in Stavanger, Norway, NATO Secretary-General Jens Stoltenberg said: “I apologize for the offense that has been caused.”

“The incidents were the result of an individual’s actions and do not reflect the views of NATO,” said Stoltenberg, who is a former Norwegian prime minister, in a written statement.

The individual involved, a civilian contractor seconded by Norway and not a NATO employee, was immediately removed from the exercise, Stoltenberg said. It would be up for the Norwegian authorities to decide on any disciplinary action, he added.

“Turkey is a valued NATO Ally, which makes important contributions to Allied security, Stoltenberg said.

In a separate statement, Norwegian Defence Minister Frank Bakke-Jensen said the offending message had been published on a computer network used during the exercise.

“The message does not reflect Norway’s views or policies and I apologize for the content of the message,” he said, adding there would be a thorough investigation followed by “appropriate measures”.