Police said that two cars had pulled up in front of the coaches carrying the Spanish fans, forcing them to stop on the S8 motorway near the village of Prosienica in east-central Poland.
Several dozen people then emerged from a nearby forest and attacked the Spaniards. Police said that a fence at the side of the motorway had been cut through.
"At the scene, paramedics from an ambulance provided assistance to the injured, and three people were taken to hospital," the police said in a post on X.
"A total of seven people were detained in connection with the incident. Items seized included balaclavas, telescopic batons, wooden sticks, and metal-cutting shears."
Rayo did not immediately respond to a request for comment. The LaLiga club's ultras, the Bukaneros, did not post about the incident on their social media accounts, while Spanish police said they did not have any information on it.
Jagiellonia sit ninth on eight points in the Conference League table, while Rayo are 12th with seven from four games.
