In fact I think Spain is one of the most recent countries to completely outlaw pedophilic relationships, in 2013 they raised (or are in the process of raising, I am not sure) the age of consent above 13 years old. Today pedophilic relationships are only allowed in a few countries (Japan for example has age of consent at 13, also they have legalized possession of child pornography and about 90% of their citizens are against censoring access to CP, and they only made hardcore CP illegal to distribute in 2003 after heavy international pressure to do so, while keeping softcore CP legal to distribute), many countries have never made hebephilia completely illegal (attraction to 11-14, 14 is age of consent in several developed countries today, including Germany), and the majority of countries still have ephebophilia partially or completely legal, with a few exceptions, primarily the USA has completely outlawed ephebophilia in many of its states, and Australia and the UK have partial bans on it as well. The US is the primary force leading to the global criminalization of CP viewers and ephebephiles, with the UK and Australia being almost but not quite as bad. If not for US influence the global age of consent average would likely be a good bit lower, for example they pressured Canada into raising the age of consent from 14 to 16. They also pressured Japan into making the distribution of hardcore CP illegal.