BEIRUT, JULY 28 -- Iraqi antiaircraft batteries shot down a Syrian MiG21 that had entered Iraqi airspace today in the first such incident, and one that observers said could imperil attempts at rapprochement between Syria and Iraq.

Iraqi television interrupted its programming to announce that the Syrian fighter plane had been shot down and its pilot taken into custody.

Syria confirmed the incident several hours later, saying one of its trainee pilots had deviated from his course by mistake.

A Syrian military spokesman called Iraq's action "unjustifiable conduct within the framework of the circumstances of the incident." He demanded a "clarification for the reasons" behind the shooting down of the plane and said there had been "several such incidents with Iraqi planes which we did not shoot down."

Iraq has repeatedly accused Syrian planes of violating its airspace but had refrained from punitive action so as not to open a second war front.

The Syrian spokesman said contact had been lost with the plane after it took off on a trial run from Deir Zor air base in northeast Syria.

Iraq said the plane, shot down as it entered Iraqi airspace at 10:39 a.m. local time, crashed near Qaem, about 200 miles northwest of Baghdad and about 12 miles inside Iraqi territory. The name and rank of the Syrian pilot were not disclosed.

Iraq broke diplomatic ties with Syria in 1980 because of Syria's support for Iran in the gulf war. Efforts by Jordan and Saudi Arabia to patch up differences between the two Arab states, ruled by rival Baath Socialist parties, have not come to fruition despite a meeting between Syrian President Hafez Assad and Iraqi President Saddam Hussein in Jordan in April.

Three years ago Iraq accused Syria of assisting Iranian warplanes in an attack against an Iraqi air base near Syria. Iraq charged that Iranian bombers could not have made the long trip without help from Syria.

In 1983, Syria shut off an Iraqi pipeline carrying oil to the Mediterranean, leaving Baghdad with only one outlet, via Turkey, after shipping through the gulf was hampered by the war.