According to the U.S. Geological Survey, the 5.8 struck near Lincoln, Montana around 12:30 a.m. local time.
There are no reports of injuries but the quake rattled this store, knocking merchandise off shelves and knocking out the power briefly.
It lasted for some 30 seconds, beginning with a slow tremor and then building in intensity.
There are reports the earthquake was felt as far away as Spokane, Washington.
It was the state’s largest shaker in a dozen years.