September produced the best sales gains of the year for many of the country's biggest chain stores, setting a pace that merchants say will be difficult to maintain.

Much of the back-to-school buying was on credit. The Federal Reserve Board reported a $2.5 billion increase in consumer credit through August, the sharpest gain since March when buyers were making up for the winter freeze.

Sears, the number one non-food retailer was first in growth. Its September sales were up 19.1 per cent from the previous year to $1.84 billion. For the first 35 weeks of its year, Sears' sales were $11.8 billion, up 15.8 per cent from 1976.

Number two K mart reported monthly and year-to-date sales were ahead of last year by 18 per cent. September sales of $941 million brought the yearly total to just over $6 billion.

Robert E. Dewar, K mart's chairman cautioned that "because of the strong sales pace experienced in August and September, we would expect the October sales increase to be moderately below the percentage gains of these two months."

J.C. Penney reported a 12.6 per cent increase in September sales, the largest monthly gain of the year. The record $860 million volume "reflects growing consumer response to new fashion looks for fall and winter," said chairman Donald V. Seibert. For the first eight months of the year, Penney's sales were up 8.9 per cent to $5.45 billion.

Montgomery Ward said its 13.8 per cent September sales gain for the month was its best September performance since 1973. Ward's total for the five weeks was $420 million, boosting the annual total to $2.8 billion, 13.5 per cent ahead of last year.

At Woolworth, where September volume was up 9.5 per cent to $519 million, President Edward F. Gibbons said, "The month represented our best so far this year for men's, women's and children's wearables," and sporting goods, cameras, and other leisure merchandise was strong.

Dayton-Hudson Corp. reported that its specialty stores division - which includes the B. Dalton bookstores - increased sales by 25 per cent, also its best monthly performance of the year and its Target discount stores in the Midwest ran 25 per cent ahead of last year, the second best performance of the month. Total volume for the big Midwestern retailer was $184 million, up 15.2 per cent.

The May Department Stores group, which includes The Hecht Co., reported a 7.7 per cent gain for the month, to $210 million and a 7.6 per cent gain for the year to $1.3 billion.

A better indicator than total sales, but one most chains to not make public, is store-for-store sales, which does not count the business gained by opening additional units.

The May Company reported its store-for-store sales were up 3.2 per cent for both the month and the year. Dayton Hudson reported it was ahead 7.3 per cent for the month and 7.6 per cent for the year on a store-for-store bases. Walmart, a rapidly growing southern discount chain based in Bentonville, Ark., said its sales were up 16 per cent on that basis.

On Wall Street, the sales figures helped boost retail stock prices. Sears was up 1/4 to 29 2/2, Penney's increased 3/4 to 35 1/4, and Woolworth's gained 1/8 to 18 7/8.

Other reports from key retailers:

Zayre Corp., up 10.7 per cent for the month to $122.5 million and up 5.8 per cent for the year to $747.8 million.

G. C. Murphy Co., up 7.7 per cent to $58 million for the month, up 7 per cent for the year to $410 million.

Carter Hawley Hel, parent of Neiman-Marcus, up 8.6 per cent of $132.8 million for the month and up 7.7 per cent to $866 million for the year.