Complex sentence: Poland was attacked in 1487--1491 by remnants of the Golden Horde, who had invaded into Poland as far as Lublin before being beaten at Zaslavl.
Split into simpler sentences: Poland was attacked in 1487--1491 by remnants of the Golden Horde. They had invaded into Poland as far as Lublin before being beaten at Zaslavl.