German police have arrested two suspects in a major manhunt triggered by the fatal shooting of two police officers during a routine traffic stop.

A 38-year-old suspect was taken into custody in the western state of Saarland shortly after police issued a wanted notice and shared his photo with the media.

He was arrested by special forces in the town of Sulzbach, Saarland police said in a statement.

A 32-year-old man was separately detained "without resisting arrest" during police searches of several premises, they added.

The shooting happened on a rural road in the Kusel district of neighbouring Rhineland-Palatinate state.

A 24-year-old female police officer and her 29-year-old male colleague were killed.

The officers were able to report that they had pulled over a car and that shots were being fired before radio contact broke off.

The shooting, for which the motive remains unclear, sent shockwaves through Germany.

Interior Minister Nancy Faeser likened the crime to an "execution" and said it showed "that police officers risk their lives every day for our security".

The crime triggered a major search operation, with police initially saying they neither had a description of the vehicle in question nor knew in which direction it had sped off.

In an update with the Kaiserslautern prosecution's office on Monday afternoon, police announced they had identified a 38-year-old suspect.

A photo shared with reporters showed a brown-haired, bearded man posing for the camera in what appeared to be a bakery.

The suspect was said to hail from Saarland, which borders Luxembourg and France.

German police closed off roads and deployed helicopters and sniffer dogs in the manhunt.

They also urged residents in the Kusel area to avoid picking up hitchhikers.

Saarland police said the twin arrests were the result of "intensive, undercover search methods" carried out jointly with Rhineland-Palatinate police.

Still in training

The early morning shooting occurred on a country road surrounded by forest and fields.

The two officers were both in uniform but were patrolling in an unmarked car.

After radio contact was lost, backup police arrived at the scene and found one officer dead and the other fatally injured.

The young woman who was gunned down was still in police training, according to Rhineland-Palatinate Interior Minister Roger Lewentz.

Germany's Bild newspaper quoted unnamed sources as saying the two officers had pulled over a "suspicious vehicle" and radioed in to say they had found dead game in the trunk, before shots were fired.

The female police officer's gun was found still in its holster, according to Bild, suggesting she had not had time to open fire.

Her colleague managed to draw his weapon before being killed, Bild added.

Germany's GdP police union expressed "deep shock and sadness" over the shooting.

The last time a police officer was killed on duty in Rhineland-Palatinate state was in 2010, when a special task force officer was shot dead by a Hells Angels biker during a raid.