For most of the early history of the settlements in the Persian Gulf, the southern shores were ruled by a series of nomadic tribes. During the end of the fourth millennium BC, the southern part of the Persian Gulf was dominated by the Dilmun civilization. For a long time the most important settlement on the southern coast of the Persian Gulf was Gerrha. In the 2nd century the Lakhum tribe, who lived in what is now Yemen, migrated north and founded the Lakhmid Kingdom along the southern coast. Occasional ancient battles took place along the Persian Gulf coastlines, between the Sassanid Persian empire and the Lakhmid Kingdom, the most prominent of which was the invasion led by Shapur II against the Lakhmids, leading to Lakhmids' defeat, and advancement into Arabia, along the southern shore lines. During the 7th century the Sassanid Persian empire conquered the whole of the Persian Gulf, including southern and northern shores.