A generation ago, the popular belief was that baseball was invented in 1839 in Cooperstown, N.Y., by Abner Doubleday. That belief was later refined, with the birth date shifting to 1846, in Hoboken, N.J. Still later, a New York University librarian found two newspaper references to some form of ''base ball'' in 1823 in New York City.

Now comes a new claimant. Pittsfield, a city of 40,000 in the Berkshires, was the site Tuesday of a news conference in which the star was a document from 1791 that suggests the game of baseball had already become a nuisance here when the nation was in its infancy. As such, the document moves the American version of the game back into the 18th century.

The discovery of the document had its origins in some late-night research by John Thorn, a baseball historian. At the news conference in City Hall, he was like a proud father as the 1791 document, a bylaw passed by the town council then, was displayed in a glass case. The document is a sheet of tan paper, slightly smaller than 8 inches by 10 inches. The words it contained voiced concern over broken windows in a new meeting house, or church. In part, it read:

'' for the Preservation of the Windows in the New Meeting House no Person or Inhabitant of said Town, shall be permitted to play at any Game called Wicket, Cricket, Baseball, Batball, Football, Cat, Fives or any other Game or Games with Balls, within the Distance of Eighty Yards from said Meeting House.''

Violators were warned that they would be fined five shillings.

Thorn, 57, lives in Kingston, N.Y. He said the discovery of the document began by accident. He has been writing baseball books for 30 years, and the eighth edition of his ''Total Baseball,'' a 2,688-page statistical encyclopedia he edits, is near completion. He is also writing a book on baseball's origins, and it was that effort that had him up late.