This question already has an answer here:
I am contacting you guys concerning one of the problems that I believe I will have them during my trip through Barcelona Airport.
I am traveling from Morocco (CMN Airport, Casablanca) to Indianapolis, USA. I have the USA visa and I found out that I may have problems ( I am sure that as Moroccan I don't need a Transit visa thought Spain), but in my electronic flight ticket I have to stay in Barcelona Airport for 6h and 35min and at the same time I have to get my checked luggage and I have to register them again in the same airport (Same Terminal 1 (Arrival/Departure). My question is: do I am going to apply for a transit visa if I am going to stay 7hours in the airport waiting for my second flight (Even if I am asked to search for my checked luggage and I am asked to register them again which means that I have to pass through the security check I believe).
I hope I am being clear enough with my question and the situation description. I would like to thank you in advance for your time and comprehension.