This is one of my favorite science fiction series of all time. The Cross-Time Engineer (Adventures of Conrad Stargard) by Leo Frankowski is the first in a series of books about a 20th century Polish engineer who is somehow transported to the 13th century, just 9 years before the Mongol hordes will sweep through Poland and kill every man, woman and child.
Conrad has 9 years to industrialize Poland and be ready for the Mongols when they arrive. There are 5 good books in this series (1 bad, but it's after he fights the Mongols and seems like an afterthought) and by the time the Mongol army arrives Conrad has fleets of steam-powered river boats bristling with guns and a well trained army waiting for them. The Mongols are in for one tough war.