An earthquake of magnitude 5.2 struck western Texas on Saturday, the European-Mediterranean Seismological Centre said.