SODA SPRINGS, Idaho (AP) _ Three earthquakes near the Idaho-Wyoming state line rattled portions of four states Thursday. There were no reports of serious injuries or damage.

The first two quakes, measuring 4.5 and 5.9 on the Richter scale, struck at 12:15 a.m. and 2:06 a.m. in the Caribou National Forest, about 25 miles from Soda Springs, seismologists said.

''It was just enough to wake people up. It was pretty gentle,'' said Judy Long, a Caribou County dispatcher in Soda Springs, a town of about 3,100 people.

The third quake measured 5.2 on the Richter scale and occurred at 7:42 p.m. about 30 miles northwest of Soda Springs, the U.S. Geological Survey in Reston, Va., reported. It was followed about 20 minutes later by a 4.0 aftershock.

The first two quakes shook dishes off shelves and clocks off walls in Afton, Wyo., right near the Idaho-Wyoming state line. One person was hit in the head by a falling flower pot, said Mike Michalek, a spokesman for the Wyoming Emergency Management Administration.

More than 27 aftershocks of 3.5 magnitude or greater had occurred as of 3 p.m., seismologists at the University of Utah Seismograph Stations said.

The larger quake also was felt in Provo, Utah, and Grand Junction, Colo., about 150 and 300 miles from the epicenter. It was the apparent culimination of an earthquake swarm, a series of tremors, that began with a 3.2 quake on Jan. 30.

Earthquakes are common to the north of Afton in the Yellowstone National Park area. An earthquake in Yellowstone's Hebgen Lake area in August 1959 registered 7.1 on the Richter Scale and killed 28 people.