DAMASCUS, Syria (AP) _ Syria ordered the expulsion of three West German diplomats today, a day after West Germany told five Syrians to leave because of alleged Syrian involvement in a terrorist attack in West Berlin.

The Syrian government also said it would cut the number of West German military attaches in Damascus, withdraw the Syrian ambassador from Bonn until further notice and no longer accept official diplomatic passports issued by the Bonn government.

The official Syrian News Agency said the diplomats, whom it did not name, have to leave Syria in a week. It said the number of West German military attaches would be reduced until it was equal to the number of Syrian military attaches in Bonn.

The Foreign Ministry today summoned West German charge d'affaires Willibald Dilger, the agency, SANA, said.

The ministry informed Dilger of Syria's ''regret'' that West Germany was ''bowing to pressure of the United States and the United Kingdom, and joining the campaign of lies and defamation against Syria, and taking unjustified action which is not based on any evidence,'' said SANA.

The ministry told Dilger it was forced to take the measures even though ''it is very keen on developing relations between the two countries,'' SANA reported.

Two Palestinians convicted Wednesday of the March 29 bombing of the Arab- German Friendship Club in West Berlin said they got the explosives from the Syrian Embassy in East Berlin.

The West German government said Thursday it held Syria responsible for the attack and ordered five diplomats to leave within a week, including two of the Syrian Embassy's four military attaches.

In both Syria and West Germany, the military attaches have diplomatic status.

The Bonn government also froze $27.9 million in development aid and said it would not immediately replace its ambassador to Damascus who returned home earlier this month after completing a regular tour of duty.

Bonn also said it would not longer allow lower-level non-diplomatic Syrian officials to enter the country on special ''service'' passports.

In Berlin, the Allied Command barred some Syrians from entering West Berlin. Police officers today were deployed in subways linking East and West Berlin to enforce the ban.

A Western diplomat said the Western Allies - the United States, Britain and France - gave West Berlin a list of Syrians considered undesirable. The diplomat, who spoke on condition of anonymity, there were ''quite a few'' names on the list, but would not elaborate.

Until recently, West Berlin authorities did not check the identities of people arriving on subways from East Berlin.

Bonn's measures were not as severe as those by Britain, which broke diplomatic relations with Syria after a Jordanian was convicted in London of trying to bomb an Israeli jetliner, allegedly with backing from Damascus.

Shortly afterward, the United States, also citing Syria's alleged links with terrorist groups, announced its own limited measures against Syria, including restrictions on trade and air travel.