KARLSRUHE, West Germany (AP) _ Two alleged IRA members captured this week are prime suspects in recent bombings of British military installations in West Germany, authorities said today.

Authorities also said the men were caught with a weapon believed to have been used in a shootout in the Netherlands that killed a Royal Air Force member in May.

An arrest warrant issued late Wednesday says the two men are ''urgently suspected'' of taking part in two bombings and an attempted murder in West Germany, the federal prosecutor's office said.

The warrant was issued after a federal court hearing in Karlsruhe, the prosecutor's spokesman, Alexander Prechtel, said in a telephone interview.

Under West German law, issuance of a arrest warrant means the two men may be held indefinitely in investigative custody until they are formally charged.

The suspects are being held at a maximum security prison, Prechtel said. He declined to give the location of the prison.

Prechtel identified the suspects as Gerard Thomas Hanratty and Terence Gerard McGeough, both 29.

They were arrested late Tuesday after crossing the Dutch border into West Germany near the town of Waldfeucht. British military installations are near the town, 45 miles northwest of Cologne.

Police found two Kalashnikov AK-47 automatic rifles and three .38-caliber pistols in their car, Prechtel said.

''Ballistics experts believe that one of the rifles found in the car is the same one used in the July 13 attack on the British army barracks in Duisburg and in the May 1 shooting of a British soldier in the Netherlands,'' Prechtel said.

On May 1, three Royal Air Force members were fired on from point-blank range in the southern Dutch city of Roermond. One airman died instantly and his two colleagues were injured.

On July 13, two bombs planted by the IRA exploded at the Duisburg barracks, injuring nine soldiers. At about the same time, shots were fired from a passing automobile at a police car in the same area.

Other evidence links the men to an IRA bombing on Aug. 5 at a British Army barracks in Duesseldorf, Prechtel said. Three British soldiers and a civilian were injured in that attack.

The suspects were arrested while driving a Peugeot 305 car rented in Mainz, 27 miles west of Frankfurt, where they also rented a car from Aug. 3 to Aug. 8, said Prechtel.

The arrest warrant also says the two are suspected of illegal possession of weapons and falsifying documents, Prechtel said.

''Hanratty was arrested with a falsified British passport and a driver's license,'' Prechtel said. No documents were found on McGeough.

Hanratty said he was born in Belfast on Jan. 26, 1959. McGeough said he was born in Carry Castle on Sep. 2, 1958. The two men gave the court no further information, Prechtel said.

''We are reasonably sure that these are their correct identities,'' Prechtel said.

The men also were found with seven full magazines for the rifles, one empty magazine, Irish money and Dutch license plates, Prechtel said.