A House Government Operations subcommittee yesterday challenged the legality of nationwide "Don't Give Up the Ships" advertising and public relations campaigns commissioned last year by an offshoot of the government's Maritime Administration.

The $950,000 advertising drive began in March 1977, around the time the maritime industry began its controversial push for a "cargo preference" law requiring that a fixed share of the nation's oil imports be carried in U.S. flag ships.

The related $125,000 public relations contract was awarded last November to Rafshoon Communications, whose principal partner, Gerald Rafshoon, is now special assistant to President Carter for communications.

All the work was commissioned by the National Maritime Council, a uniquely structured non-profit association of industry, labor and government. The campaign is still being carried out with the help of the Maritime Administration, which initiated the Maritime Council, collects dues for it and runs its day-to-day affairs.

The Maritime Administration is the arm of the government that subsidizes the maritime industry.

Rep. Benjamin S. Rosenthal (D-N.Y.), the subcommittee chairman, said the money for the campaign is coming in large measure from tax-deductible contributions of corporate members of the Maritime Council.

At a hearing yesterday, Rosenthal said expert witnesses and documentation in Maritime aAdministration files "call into series question" the legality of the tax deductions.

The promotional campaign last year was aimed heavily at generating a public outpouring of letters to Congress in favor of "a stronger American merchant marine." Rosenthal argued that it clearly constitutes the kind of "grass-roots lobbying" that the Internal Revenue Service for years has said is not tax decductible.

Rosenthal also suggested that the use of federal personnel, facilities and resources in spupport of the Maritimee Council effort might violate federal criminal law prohibiting use of Congressionally appropriated funds for lobbying.

The "Don't Give Up the Ships" advertising account is held by Vansant, Dugdale, which began working in the spring of 1977 with a $370,000 budget and is now carrying out a second-year program for some $580,000.

Rafshoon Communications won the public relations account less than two weeks after the House, in an unexpectedly decisive vote, scuttled the cargo preference bill the industry had been seeking with the help of the Carter White House and organized labor.

When it took on the Maritime Council account, the Rafshoon agency had just concluded a $1.2 million campaign for the cargo preference bill on behalf of the U.S. Maritime Committee to Turn the Tide, and ad hoc group organized by members of the Shipbuilders Council of America.

Testifying yesterday, Rafshoon Communications vice president Stephan Lesher said "yes, indeed," the firm owould continue its work, notwithstanding partner Gerald Rafshoon's official elevation to the White House staff July 1.

"Do you see any conflict of interest?" Rosenthal wondered.

Lesher said he did not. "Our firm does not lobby," he insisted. "We do not accept government contracts."

When Lesher said he had been assured that no government money was involved in the contract, Rosenthal pointed out that a full-time Maritime Administration official, LEwis Paine, is also executive secretary of the Maritime Council, approving the "Don't Give Up the Ship" ads that are run and consulting with Lesher on a variety of public relations matters.

"What he does with his business is his time," Lesher replied. "My obligation is to be paid by private funds because that is the policy of our firm."

The leadoff witness, Alan Winterhalter, a former attorney for the Maritime Administration, testified that in 1972 he told superiors he felt there was 'a potentially serious conflict of interest" in Maritime Administration lawyers and accountants furnishing advice to the council and in Maritime Administration officials serving as officers of the council, which was organized in 1971 as a non-profit corporation.

"It was incredible to me," Winterhalter said of the Maritime Administration's dues-collecting for the council, "but the Maritime Administration is incredible to me." He described the agency, an arm of the Commerce Department which he left in 1973, as "schizophrenic. It is half promotional half subsidy-granting, a quarter regulatory . . ."

The executive vice president of the Vansant, Dugdale advertising firm, Russell J. Sachs, acknowledged to the subcommittee that an early prospectus he drafted stated that the campaign would work to foster a new climate, "one that would see legislation passed requiring that a quota of various cargoes be carried in U.S. flag vesslels."

But he said that Paine told the firm the council "does not officially take positions on legislation," and he insisted that he has tried to draw that line wver carfully ever since. He said he "certainly was aware" that the cargo preference bill was the only major maritime industry bill before Congress, but he maintained "that [cargo preference] was never a specific object of this advertising."

Rep. Elliott Levitas (D-Ga.) exclaimed, "The symbiotic relationship between private industry and a government agency is spelled out so clearly here. Here you actually had a marriage formalized with documents. Government and business are right in bed together!"