Time and again in his testimony before the Iran-contra investigating committees, Secretary of State George P. Shultz criticized William J. Casey, the late CIA director, for being such an advocate of policies he favored, including arms sales to Iran, that he slanted intelligence analyses to support his views.

Shultz said one of the lessons of the Iran-contra affair is the need to separate "the function of gathering and analyzing intelligence from the function of developing and carrying out policy. If the two things are mixed in together, it is too tempting to have . . . the selection of information that's presented favor the policy that you're advocating."

Even before the secret sale of arms to Iran began, Shultz said, "I had come to have grave concerns about the objectivity and reliability of some of the intelligence I was getting." He added that he is "reassured" by the approach of new CIA Director William H. Webster, who has said he doesn't want to be a policy-maker.

Because Casey was the first head of the Central Intelligence Agency to be a Cabinet member, his role as a policy advocate has long been controversial in the closed world of intelligence experts. But Shultz's stinging commentary was the first time the debate was joined publicly by a major Reagan administration official.

Shultz said: "I hate to say it, but I believe that one of the reasons the president was given what I regard as wrong information, for example, about Iran and terrorism, was that the agency or the people in the CIA were too involved in this," a reference to the administration's secret Iran initiative. Shultz said, for example, that he didn't agree with Casey -- and the testimony of fired National Security Council staff aide Oliver L. North -- that Iran had forsaken the use of terrorism.

The secretary of state also criticized CIA and NSC analyses in early 1985 that concluded the government in Iran was unstable and the Soviets were poised to increase their influence there. Shultz said he felt the intelligence was "faulty and that it was tied in with policy." Two top CIA analysts involved in those estimates have said since that they were wrong.

Shultz acknowledged that he sometimes thought Casey's intelligence product was "faulty" simply because he didn't agree with it. And his relationship with Casey wasn't close, as shown by testimony that Casey had sent a letter to President Reagan last November suggesting that Shultz be fired.

But several members of the committees expressed concern about Shultz's critique of the intelligence process. Rep. Dante B. Fascell (D-Fla.), also chairman of the House Foreign Affairs Committee, gave Shultz a copy late Friday of what he called a "suppressed" CIA report showing Iran still used terrorism as a tool.

Fascell said he hoped "that we never get in this pickle again where the head of the agency for the gathering of intelligence . . . is put in a position, either directly or indirectly, where he is driving policy."

Sen. Sam Nunn (D-Ga.), who is chairman of the Senate Armed Services Committee, pointed out that Rear Adm. John M. Poindexter, then the national security adviser, told Reagan in January 1986 that Iran's military posture was deteriorating in its war with Iraq. That was an Israeli view, embraced by Poindexter and Casey. In fact, Nunn noted, Iran was on the offensive for most of 1986.

Sen. Warren B. Rudman (R-N.H.), vice chairman of the Senate select committee on the Iran-contra affair, told public television after Friday's hearing that an important part of Shultz's testimony was that "We are getting here a picture of a president who may not have been briefed in the detail that he should have been briefed and may have been briefed with intelligence, to put it fairly bluntly, that may have been 'cooked.' "

Sen. Patrick J. Leahy (D-Vt.), until January the vice chairman of the Senate Select Committee on Intelligence, said in an interview that Casey's role as a policy-maker troubled several members of his committee, most notably on administration policy toward Nicaragua. "When Casey wanted to get going on something where he was helping to set the policy, everyone learned to take the intelligence reports with a grain of salt," he said.

CIA directors before Casey also were involved in controversies over the objectivity of intelligence, from charges in the '60s that the agency was overstating Vietcong troop strength to accusations in the '70s that it was understating Soviet military strength.

Early in the Reagan administration there was controversy about CIA reports on the Soviet role in backing international terrorism and on the extent of the communist threat in Central America.

The House Permanent Select Committee on Intelligence published a report critical of some analyses on Nicaragua. And a senior CIA analyst resigned to protest what he called Casey's interference in an estimate on Mexico.

Yet even Casey's detractors agreed he did much to improve the CIA's analytical staff. He reorganized it along geographic, rather than topical, lines. He added money for travel and time off for research, and he started a formal system of keeping tabs on analysts' records.

Several experts said they give generally good marks to the intelligence community's published estimates, but some agree with Shultz that Casey at times put a spin on his intelligence reports to try to make points in policy debates.

One administration official said that career CIA officers realize the danger of mixing analysis and covert operations and thus try to shield analysts from operatives. "The difficulty, and what Shultz is talking about, is when you get a few individuals, not the institution, pushing something. Then something might get skewed."