The rulers overcame their struggles and by the end of the century were in position to invade other countries. Neither comma is a good choice. 'By the end of the century' is just a prepositional phrase acting as an adverb.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.