DETROIT, AUG. 11 -- The chairman of Gannett Co. said today that The Detroit News is in a "no-lose situation," able to overcome the Detroit Free Press in outright competition or coexist in a partial merger with it.

"Our judgment is it would be better for all concerned if the second scenario were played out," Allen H. Neuharth testified in Justice Department hearings on a joint operating agreement for the News and the Free Press, where Neuharth was formerly an executive.

Gannett is parent of the nation's largest newspaper group. In the federal courtroom, Alvah H. Chapman Jr., chairman of Knight-Ridder Inc., the second-largest group and owner of the Free Press, waited to testify.

Neuharth said Gannett's options included continuing a fierce competition that has meant operating losses at both papers, "so that ultimately ... the Detroit News would be the only surviving newspaper.

"We were prepared and we are prepared to do that," he said.

But an alternative was the proposed cost-cutting merger of advertising, circulation and production operations, preserving separate news and editorial departments, he said.

"We elected to proceed with scenario number one and work toward number two," Neuharth said.

As owner of a sole remaining newspaper, Gannett's profits "might be and in most cases certainly would be better than they would be under a joint operating agreement," he said.

But, he said, "Philosophically, we believe those newspaper markets that have two newspapers are generally better served than the markets that have one."

Neuharth also recalled his three-year tenure, from 1960-63, at the Free Press, where he served as assistant executive editor before joining Gannett. "I gained tremendous respect for the product, for the job it was doing in the market and for the people," he said.

"It would not have given me any satisfaction to engage in practices here that would result in the demise of the Free Press," he said.

Gannett and Knight-Ridder say the News and Free Press lost $142 million from 1981 through the first quarter of 1987. The newspapers say the Free Press is in danger of failure and seek a limited antitrust exemption.

Attorney General Edwin Meese III can approve the joint operating agreement under the Newspaper Preservation Act of 1970 if he finds that one paper is in danger of failing and that an agreement would preserve independent editorial voices.

Detroit Mayor Coleman Young opposes such an agreement because he fears it will decrease editorial diversity. Newspaper employe unions oppose the agreement because they fear it will cut jobs at the papers, which have a combined work force of 2,400.

The Free Press, founded in 1831, has a circulation of 639,720 daily and 724,342 on Sundays. Circulation of the News, founded in 1873, is 678,399 daily and 839,319 on Sundays, according to publishers' statements for the six months that ended March 21.