West Germany today ordered 22 members of the Libyan People's Bureau (embassy) in Bonn to leave the country within one week and declared that extra security precautions were being introduced to protect Americans from terrorist attacks.

At its weekly Cabinet meeting, the government of Chancellor Helmut Kohl approved plans to reduce personnel at the West German Embassy in Tripoli from 22 to 19, deemed the absolute minimum to handle the interests of more than 1,400 German residents in Libya.

The staff of the Libyan mission in Bonn must also be cut to 19 from its present contingent of 41 within one week, a Foreign Ministry spokesman announced. Those Libyan representatives who remain behind in West Germany will be banned from traveling outside the capital except to reach the local airport, he said.

The measures were put into effect following Monday's decision by the 12 European Community nations to impose severe restrictions on Libyan embassies in Europe to thwart future involvement in terrorist activities.

West Germany, as well as other European allies, now hopes that more forceful steps will dissuade Washington from conducting further military strikes like last week's bombing raids against targets in Tripoli and Benghazi.

The tougher stance adopted by the government in recent days also reflects its desire to overcome charges of weakness in antiterrorism policy that caused a rift with the Reagan administration.

A Spanish Foreign Ministry spokeswoman said that Spain will also expel a number of Libyans, Reuter reported from Madrid.

Friedhelm Ost, the Kohl government spokesman, said West German security forces were placed on maximum alert to prevent bomb attacks like the one on a West Berlin discotheque April 5 that killed two persons and injured 230.

Ost said the government had decided to issue regular West German license plates for U.S. diplomatic and military personnel so they could not be easily pinpointed as terrorist targets. He added that police may close streets to traffic in neighborhoods with a predominantly American population.

Interior Minister Friedrich Zimmermann told the Cabinet that West German security forces had identified four Libyan diplomats as presumed secret agents and would insist that they be included among those leaving the country.

West German authorities would also subject more than 1,200 other Libyans working or studying here to much closer scrutiny. If they were suspected of any wrongdoing they would be expelled, the government spokesman said.

Chancellor Kohl, in remarks to be published Thursday in the mass circulation daily Bild, said his government's actions showed its determination in confronting terrorism.

He called on West German companies to reduce their business dealings with the Libyan government of Muammar Qaddafi but also urged American oil firms to withdraw their employes from Libya.

West Germany has refused to support economic sanctions against Libya because the government believes such restrictions are easily circumvented. Bonn and other European capitals often note that U.S. oil companies have had little trouble getting around President Reagan's embargo on Libya.

The West German interior minister also reported mounting evidence that a Palestinian arrested in West Berlin over the weekend in connection with the disco blast maintained contacts with Libya.

Police apprehended the suspect, Ahmed Nawaf Mansour Hasi, 35, following a tip from British police who seized his brother, Nezar Hindawi, and charged him with trying to blow up an El Al plane.

Zimmermann said that 80 witnesses present at the discotheque the night of the blast had appeared at a police lineup. Many of them recognized Hasi as being there the night of the blast, he said.