The Spanish embassy in Iraq filed an official apology after the plane carrying Spanish King Felipe VI raised an outdated Iraqi flag, following the arrival of the king to Iraq on Wednesday.
"We apologize very much for the mistake that our pilots made this morning by hanging a former flag of the Republic of Iraq during the visit," the embassy said in a tweet.
"This mistake will be corrected this afternoon upon departure. In the meantime, the historic visit is going well," the embassy said.
Local media and Facebook pages posted a video showing the arrival of King Felipe VI to Baghdad aboard a Spanish plane carrying its flag alongside the three-star Iraq flag that was used during the Baath Party's rule between 1963 and 1991.
Spanish King Felipe VI arrived Wednesday morning in Baghdad, marking the first visit of a Spanish king to the country in four decades.
The three stars of the obsolete flag symbolized the aspiration that Iraq would join with Egypt and Syria in a new union.