NEW YORK (AP) _ Residents throughout the New York metropolitan area were jolted or nudged awake Saturday morning by an earthquake which, although minor, packed enough punch to be felt from southern Canada to Philadelphia.

But a bigger quake 51/2 hours later in southwestern Montana went virtually unnoticed in a swarm of tremors that have kept the mountains shaking for days.

The New York quake, which struck at 6:08 a.m., registered 4.0 on the Richter scale and was centered about 15 miles north of midtown Manhattan in the suburban Westchester County community of Ardsley, according to seismologist Klaus Jacob at the Lamont-Doherty Geological Observatory in Palisades.

The U.S. Geological Survey's National Earthquake Center in Golden, Colo., gauged the quake's force at 3.8 on the Richter scale.

''It sounded like a sonic boom or an explosion,'' said Doris Selig, who lives in Dobbs Ferry, about 11/2 miles from Ardsley. ''The building shook momentarily.''

''My whole bed, my body was actually shaking. I thought I was dreaming but it was too long,'' said Sharon Bryan, who lives in Ewing Township, N.J., about 90 miles from the quake's center. ''I sat up in bed and I could hear things vibrating in my medicine cabinet.''

Though police switchboards in New York, New Jersey and Connecticut lighted up instantly after the quake, there were no immediate reports of injuries or damage.

In Montana, a quake registering 4.1 on the scale occurred five miles west of West Yellowstone at 9:35 a.m. MDT, the National Earthquake Information Center reported.

It equaled the region's strongest quake so far this year, just two days earlier.

At least 20 quakes have shaken the West Yellowstone-Hebgen Lake area in the past four days, a frequency high even for southwestern Montana, which has an earthquake almost every day, police said. There have been no reports of damage or injury.

Police reported a few calls after Saturday's quake, but said no one was alarmed. Sheriff's offices at Bozeman and Virginia City said they had received no calls.

In 1959, a quake in the West Yellowstone area measuring 7.1 killed 28 people, caused $11 million in damage, and created Hebgen Lake.

The New York tremor was the largest one recorded there in recent years, said Waverly Person, a geophysicist at the National Earthquake Center.

''It was felt very widely,'' Person said. ''We've gotten reports from as far north as southern Canada and south to Philadelphia.''

He said the last quake to shake the metropolitan region - 3.2 on the Ritcher scale - occurred in 1980 and was centered in the same area. The most powerful one in the area, estimated at 5.0, occcurred in 1884.

According to the Richter scale, which measures ground motion on seismographs, a quake of 3.5 can cause slight damage near the center; 5.0 considerable damage, and a rating of 8 is considered a great quake.