The quartet was scored by Alex Vega (3), Funes Morey (48), Jesus Gallardo (67) and Orial Antona (90 from the spot).
This is the second match between the two teams, after the first at the 1986 World Cup in Mexico, when the Iraqi team lost 0-1 during their only participation in the World Finals.
The Iraqi team will play a second friendly in Spain next Saturday against Ecuador, which are also preparing to participate in the 2022 World Cup in Qatar.
The two games come a few days after the appointment of Spaniard Jesus Casas as coach of the “Lions of Mesopotamia” team, but he will be content to follow them before officially starting his mission in early 2023 in the 25th Gulf Cup hosted by the city of Basra in the south of the country.