That stems from a remark in The Royal Natural History by Richard Lydekker in 1894, which simply says "it is also found across the straits of Gibraltar and some of the neighboring parts of Spain". Given that the macaques were frequently kept as pets and moved around, if they were found wild in Spain at this time there really isn't anything to say whether they were "original" or introduced.Finally, something of interest I wasn't able to follow up is the reference to the possible survival of truly wild (non-introduced) Barbary macaques in southern Spain until as late as the 1890s. I managed to find that the reference 'Walker, 1992' was 'Walker's Primates of the World' where the same information is mentioned but I couldn't find the four references that accompany it.