Workers in New England, New York and New Jersey got the largest raises last year, averaging well above 5 percent, but Alaskans continue to enjoy the biggest paychecks despite a slight decline in their average earnings, the government said yesterday.

Nationwide, the average annual pay of workers covered by state and federal unemployment insurance programs was $19,996 in 1986 -- a $777, or 4 percent, increase over 1985 and well ahead of an inflation rate of just 1.1 percent last year, the Labor Department said.

Massachusetts and New Hampshire, with unemployment rates running well below 3 percent, led the nation in pay increases last year. Workers there reaped average raises of 6.6 percent and 6.4 percent, respectively.

Workers in Connecticut followed with annual pay increases averaging 6.1 percent. Other states where pay raises averaged more than 5 percent were New York, Maine, New Jersey, Vermont and Rhode Island.

The smallest average pay increases were concentrated in Appalachia, the Oil Belt and the West, excluding California and Arizona.

Alaskans actually took a pay cut of about 1 percent. But they still led the country with the highest annual wages, averaging $28,442 in 1986.

Workers in Washington, D.C., followed with the second-highest wages, averaging $27,137, a 3.7 percent increase over the previous year. The average wages for government workers in Washington was $31,011, a 1.4 percent increase over 1985.

Other states with annual wages averaging more than $20,000 in 1986 were New York, Michigan, Connecticut, New Jersey, California, Illinois, Maryland and, for the first time, Massachusetts and Colorado.

South Dakota and Mississippi continued to lead the nation's list of states with the lowest average wages -- $14,477 and $15,420, respectively. Other states with annual wages averaging less than $17,000 in 1986 were North Dakota, Montana, Nebraska, Arkansas, Maine, Iowa, South Carolina, Idaho and Vermont.

Yearly wage gains averaged less than 3 percent in Ohio, Indiana, West Virginia, Kentucky, Louisiana, Texas, Oklahoma, New Mexico, North Dakota, Montana, Wyoming, Utah, Idaho and Oregon.

In terms of broad occupational groups, the biggest raises went to workers in finance, banking, insurance and real estate. Workers in those industries saw their wages rise 8.7 percent over 1985, to a nationwide average of $24,249.

Employes of business and health services had the second-largest raises -- 4.6 percent to an average $17,643. But their pay levels only ranked ahead of retail trade workers, whose average pay in 1986 was $11,139, a 3.7 percent increase over 1985.

Miners and workers in the oil and gas industries continued to have the highest wages, averaging $32,555 last year, an increase of 3.8 percent over 1985.

In fact, the best thing to be -- if you survived massive layoffs in the oil and mining industries last year -- was an employed oil worker in Alaska. Their wages last year averaged $63,735, a 7.9 percent increase over 1985.

The survey by the Bureau of Labor Statistics is based on payroll data submitted by employers in paying unemployment insurance taxes and covers 98.2 million workers -- both full- and part-time -- or 90 percent of the total U.S. civilian work force.

Excluded were agriculture workers on small farms, elected officials, domestic workers, most railroad employes, student workers at schools and employes of certain small, nonprofit organizations.