A law that could force Apple to share its digital download technology with rivals has been passed in France.
More than a billion downloads have been bought from iTunes
Currently, songs bought from Apple's iTunes music store can only be played on Apple-manufactured iPods.
The bill would mean any digital song could be played on any player, regardless of its format or source.
But the legislation leaves room for artists to sign deals with Apple and others, enabling them to restrict which systems their music will play on.
Under the bill, companies such as Apple, Sony and Microsoft could be made to share their proprietary copy-protection systems.
It was intended to deter piracy and ensure no single company dominated the fast-growing music download market.
In March, Apple said the law would encourage "a state-sponsored culture of piracy", and hinted that it could withdraw from the French market.
The law has been watered down and the loophole to allow artists to sign exclusive deals with individual companies was added last month.
The bill will also create a new independent authority to decide when "interoperability" should apply.
Both the Senate and the National Assembly, France's upper and lower houses, voted in favour of the bill, the final stage before it becomes law.
More than one billion downloads have been purchased from the iTunes store since it was set up three years ago.
The legislation also includes anti-piracy measures threatening fines of thousands of euros and prison sentences for professional copiers.