A German court has ruled police can conduct random identity checks on train passengers based on skin color as part of efforts to track down illegal immigrants.

A court in the western city of Koblenz issued the ruling on Tuesday in response to a complaint filed by a black German rail passenger who was approached by police who demanded to see his identification.

The court said officials trying to track down illegal immigrants could use criteria that include physical appearance to check train passengers along routes that are frequently used by illegal immigrants.

In a separate development, a strike by public sector workers demanding more pay forced German airlines to ground hundreds of flights on Tuesday.

Airport officials say about 450 flights were cancelled at Frankfurt Airport, one of the busiest in Europe. The strike also affected flights in cities including Munich and Dusseldorf.

Service workers with the Verdi union walked off their jobs after the union rejected a proposed pay raise of 3.3 percent over a two-year period. The union is pushing for a 6.5-percent pay increase for its 2 million members.

In February, a strike by ground crew workers at the Frankfurt Airport resulted in hundreds of cancellations.

Some information for this report was provided by AFP and Reuters.