The name " Latvia " originates from the ancient Latgalians , one of four eastern Baltic tribes that formed the ethnic core of the Latvian people ( ca. 8th - 12th centuries A.D. ) .