The armed forces had a second consecutive year of unusually safe flight records, but the relatively low number of accidents caused an increased number of deaths, reports for fiscal 1987 show.

The reports, obtained last week, indicate the aviation accident rates of the Air Force, Army and Marine Corps worsened only slightly while the Navy posted one of its best records.

All told, the services experienced 165 major, or Class A, accidents during the year ending Sept. 30. That compared with 163 reported for fiscal 1986, when the Defense Department logged its safest flying year in history.

The slight increase in the combined number of accidents came during a year in which the services also increased slightly the number of hours spent in the air by their crews. Military aviators flew roughly 7.4 million hours during fiscal 1987, compared with 7.3 million the year before.

While the overall accident rate changed only slightly, however, the number of servicemen killed in aviation mishaps increased from 148 fatalities in fiscal 1986 to 167 in 1987, a 13 percent increase.

Only the Marine Corps had fewer fatalities -- 21 in fiscal 1987, compared with 38 the previous year.

The Navy, which did the most to improve its accident rate, lost 45 individuals in aviation accidents in fiscal 1987, up from the 36 reported the year before. The Army lost 40 soldiers during the year compared with 27 in fiscal 1986, while the Air Force suffered 61 fatalities compared with 47 in 1986.

A Class A accident is defined as one that results in either a fatality or property damage to a plane or helicopter exceeding $500,000.

The reports show the Navy experienced 50 such accidents or 2.93 for every 100,000 hours of flight time. That compares with 58 and a rate of 3.39 in fiscal 1986.

The Marine Corps reported 20 serious accidents for a rate of 4.88, up from 18 and 4.18 the year before. The Army had 38 serious accidents, or a rate of 2.22, up from 34 and 2.04. And the Air Force reported 57 accidents and a rate of 1.65, compared with 53 accidents and 1.53 the previous year.

Historically, the accident rates of the Navy and Marine Corps have exceeded those of the Army and Air Force because of the number of operations conducted at sea.

The latest reports show that many of the fiscal 1987 Navy and Marine mishaps involved the types of high-performance jets assigned to aircraft carriers. For example, the two services together lost 10 A6 attack jets and eight FA18 fighters during the year.

The Navy announced last Friday that it was grounding dozens of the FA18s to correct problems with their engines.

The Navy and Marine Corps also lost seven F14 fighters during the year, although the records show a total of eight. The eighth incident involved an accident last September during which an F14 shot down an Air Force reconnaissance plane; the Navy was told to count that loss against its record.

As for the other services, the records show the Air Force lost 12 F16 jet fighters, along with one B1B heavy bomber; 10 aging F4 fighters; three front-line F15 fighters and three F111 bombers.

The Army continued to have the most problems with its aging fleet of Vietnam-era UH1 Huey helicopters, losing nine. The replacement for that type, the UH60 Black Hawk, suffered eight Class A accidents, up from the three that crashed in 1986.

The Army also lost seven aging OH58 light observation helicopters along with four Vietnam-era AH1 Cobra gunships and four new AH64 Apache gunships.