Mr. Hunter then commandeered a car, and demanded and got a plane at a small municipal airport straddling the Beverly-Danvers border about 20 miles north of Boston.

Robert Golder, a 21-year-old flight instructor, said he was ''basically in shock'' when Mr. Hunter demanded the plane. ''He wanted me to start the airplane for him. He told me not to do anything stupid. He said he had just killed some people.''

Mr. Hunter made no comments when he was captured after landing at Logan early today, the police said.

Richard Fontz, the Federal Aviation Administration's field manager, said Mr. Hunter was not a licensed pilot but had apparently had some instruction. ''It obviously wasn't the first time he flew an airplane,'' Mr. Fontz said.

The flight began about 10:30 P.M. on Tuesday, and in the next three hours ambulance services tried to anticipate where the pilot might land so they could prepare for possible injuries. Two Cars Hit in Lynn

The police in Boston received more than 200 calls from people reporting the sound of gunfire. In Lynn, a suburb of Boston, the police said two cars were hit by a shower of shots believed fired from the plane.

Mr. Hunter's flight also took him over Boston's Kenmore Square neighborhood, where the Boston Red Sox had just finished losing a baseball game at Fenway Park to the Minnesota Twins.