File picture: Rene Ruprecht / DPA / AFP.

Germany's upper house of parliament on Friday approved a controversial law imposing tolls on the country's famous Autobahns (motorways), in the face of objections from neighbouring countries who say it discriminates against foreign drivers.

Austria immediately announced it would file a legal challenge with the European Court of Justice.

The law is the result of a compromise struck with the European Commission last month, after it threatened to take Germany to court if the toll project was not made fairer to foreigners.

It includes lower costs for the short-term passes most likely to be used by visitors, with prices for a 10-day pass now starting at 2.50 euros (R35.50) for the most environmentally friendly cars.

The price for an annual pass will be capped at 130 euros (R1846) for German and foreign cars, but German-registered drivers will essentially be refunded the money thanks to a matching reduction on their motor vehicle tax bill.

Berlin's plans have angered neighbouring Austria, Belgium and the Netherlands which see the toll as a levy on foreign cars only.

It was "not a good sign for Europe" that Germany was introducing the toll, Green party politician Winfried Kretschmann told the Bundesrat – the upper house of parliament representing Germany's federal states – on Friday, calling it a "foreigner toll" that would inflict "great political damage".

German states that border other countries fear the toll will discourage tourism and trade with neighbours.

But conservative transport minister Alexander Dobrindt has rejected the criticism, saying that most cross-border traffic moves on smaller roads not subject to the charge.

Austrian Transport Minister Joerg Leichtfried, announcing in Vienna the planned legal challenge, called the European Commission's behaviour "scandalous" and the toll "discrimination based on nationality".