Nato’s secretary general has apologised to Turkey over military exercises in Norway during which Turkey’s founding leader, Mustafa Kemal Ataturk, and its president, Recep Tayyip Erdoğan, were reportedly depicted as “enemies”.

Erdoğan said Turkey withdrew 40 soldiers participating in the drills at Nato’s joint warfare centre in Stavanger, Norway, in protest at the incident and criticised the alliance. “There can be no such unity, no such alliance,” he said in an address to his ruling party’s provincial leaders.

Details of the incident were sketchy. Erdoğan said Ataturk’s picture and his own name were featured on an “enemy chart” during the drills.

The individual who posted the material was described as a Norwegian civil contractor seconded by Norway, and not a Nato employee.

Nato secretary general Jens Stoltenberg issued a statement saying: “I apologise for the offence caused.” He said the incident was the result of an “individual’s actions” and did not reflect the views of the alliance.

He added that the individual was removed from the exercise and an investigation was underway. “It will be for the Norwegian authorities to decide on any disciplinary action,” Stoltenberg added. “Turkey is a valued Nato ally, which makes important contributions to allied security.”

Stoltenberg apologised again at the Halifax international security forum in Canada. He said he had already spoken to Turkey’s defence chief and that it “won’t create any lasting problems, and I think it’s already behind us”.

Norway’s defence minister, Frank Bakke-Jensen, also expressed his concerns about the incident. “The message does not reflect Norway’s views or policies and I apologise for the content of the message,” Bakke-Jensen said.

The joint warfare centre is a multinational Nato unit based in Stavanger, 300km south-west of Oslo. According to its website, it has a staff of 250 made up of civilians from 11 Nato member states, including Turkey.

In March, the Norwegian government caused fury in Turkey by granting political asylum to five Turkish officers based in Norway who had refused to return home after the failed July 2016 coup attempt in Turkey. The five officers said that they feared being arrested and tortured.