In the eighth century A.D., Turkic-speaking Oghuz tribes moved from Mongolia into present-day Central Asia. Part of a powerful confederation of tribes, these Oghuz formed the ethnic basis of the modern Turkmen population. In the tenth century, the name "Turkmen" was first applied to Oghuz groups that accepted Islam and began to occupy present-day Turkmenistan. There they were under the dominion of the Seljuk Empire, which was composed of Oghuz groups living in present-day Iran and Turkmenistan. Turkmen soldiers in the service of the empire played an important role in the spreading of Turkic culture when they migrated westward into present-day Azerbaijan and eastern Turkey