The Reagan administration yesterday condemned as a "particularly grave violation" of international law the recent Iraqi use of chemical weapons that reportedly killed hundreds of civilians and soldiers in northern Iraq last week, and said there were "indications" Iran had also used chemical artillery shells against Iraqi positions.

If Iran has used such weapons, the exchange of chemical attacks would mark a gruesome point in the 7 1/2-year-old Iran-Iraq war and constitute the first time since World War I that two enemies have resorted to such warfare against each other, according to U.S. sources.

U.S. officials have been warning for some time that both Iran and Iraq were obtaining and stockpiling chemical weapons. The administration has sought to head off their use by applying diplomatic pressure to the Iraqi government in private and supporting three U.N. resolutions of censure.

State Department spokesman Charles E. Redman said the reported gas attack by Iraq against its Iranian-occupied city of Halabja "appears to be a particularly grave violation of the 1925 Geneva Protocol Against Chemical Warfare."

He added, "There are indications that Iran may also have used chemical artillery shells in this fighting."

It was not clear what "indications" the United States had obtained of Iranian use of such shells and Redman would not elaborate. A U.S. official said the evidence collected by U.S. intelligence agencies of purported Iranian chemical warfare was far less convincing than the startling evidence of Iraqi chemical attacks provided by television cameras that filmed scores of dead Iraqi Kurds in the northern Iraqi border town of Halabja.

Referring to those pictures, shown on American television Tuesday night, White House spokesman Marlin Fitzwater told reporters: "Everyone in the administration saw the same reports you saw last night. They were horrible, outrageous, disgusting and should serve as a reminder to all countries of why chemical warfare should be banned."

The International Committee of the Red Cross also condemned Iraq's use of chemical weapons and called it a "new and tragic escalation" of the war.

Redman said, "We condemn without reservation any use of chemical weapons in violation of international law. We call upon Iran and Iraq to desist immediately from any further use of chemical weapons which are an offense to civilization and humanity."

Noting that the United States has supported three past U.N. Security Council resolutions comdemning Iraq's use of chemical weapons, Redman said this country would support similar action in this incident.

He also called upon Iran and Iraq to respond to U.N. Secretary General Javier Perez de Cuellar's invitation to their foreign ministers to come to New York to again discuss implementation of a cease-fire resolution approved unanimously by the Security Council last July. Iran has so far refused to accept it.

Redman said both sides are now attempting to stockpile chemical weapons. He said the United States had done its best to prevent both countries from gaining the equipment needed to manufacture them. However, both combatants have obtained the capability to produce chemical weapons on their own, according to U.S. officials.

According to the Encyclopaedia Britannica, in the 35 years between the end of World War I in 1918 and the end of the Korean War in 1953, there have been only two recorded instances of the use of toxic chemicals in warfare. The Italians used mustard gas during their invasion of Ethiopia in 1935-36, and the Japanese used chemicals against the Chinese on a small scale several times between 1937 and 1942.

But "chemicals have not been used by both sides since World War I," according to Gordon Burck, a chemical warfare specialist at the Federation of American Scientists.

Staff researcher Michelle Hall contributed to this report.