The U.S. Geological Survey says a magnitude 6.3 earthquake has struck western Iran near its border with Iraq.