The police said there were holes in the roof and in the ceilings and floors of several classrooms, a hallway and an office. At least one desk was hit, ceiling tiles had fallen in some classrooms, and there were scratch marks on the building's brick exterior.

The school's 970 pupils, in grades three through six, had no classes yesterday or today because the state's teachers were at an annual convention in Atlantic City. They will return on Monday, school officials said.

Michael Dupuis, the president of the township school board, said that residents and school officials were concerned over the incident, but not unduly so, and had no misgivings about living near the firing range. "There will be concerns, but I feel confident that the military has done and is doing everything it can to safeguard against any occurrences of this nature," he said.

Colonel Webster said the incident yesterday was under investigation by the Pentagon and state officials. "We have no idea why the gun went off," he said. "This is a very unusual and unique thing." He said the range at Warren Grove had been open for more than 40 years and that this was the first time bullets fired from the air had struck off the range. It was unclear who reported the incident to military officials.

But there have been problems from time to time. In January 2002, a New Jersey Air National Guard jet crashed near the Garden State Parkway, but the pilot parachuted safely, and no one was injured. In June 2001, an F-16 on practice run dropped a 25-pound smoke bomb that burned 1,600 acres of pine forests in Ocean County. And in 1999, another bombing run went awry and 11,000 acres of pine forests burned.

The planes, assigned to the 113th Wing of the District of Columbia Air National Guard, had taken off earlier in the evening from Andrews Air Force Base in Maryland. The 20-millimeter cannon of an F-16, an M61-A1 Vulcan, normally holds 540 rounds, but on training missions, the colonel said, limiting devices allow only 110 bullets to be fired on a flight.

Colonel Webster said the F-16 was north of the target range and the school and was turning toward the southeast to begin a 30-degree strafing dive when the cannon went off prematurely some 2,000 feet above the normal level for opening fire. "It was not an intentional release," the colonel said. "We do not engage targets unless we're aimed at them. He was aimed at space."