France's parliament rejected a bill on Thursday that proposed disconnecting Internet users if they download music or films illegally, with the ruling UMP party failing to turn out in force to approve the law.

Backed by President Nicolas Sarkozy's government, the legislation was meant to quell the flow of free songs and films on the Internet that has hurt the revenues of artists and production companies.

However, opposition politicians managed to defeat it at a final vote in the National Assembly on Thursday when only a small number of UMP lawmakers turned up for the session, handing the center-right government an embarrassing defeat.

Sarkozy said he was determined to see the law passed and accused the opposition of parliamentary maneuvering.

Nicolas Sarkozy does not intend to give up on it, whatever the derisory maneuvers that only serve to harm creative diversity, his office said in a statement.

Socialist parliamentarians broke out in applause after the vote went their way. The government said it plans to re-submit the bill later in April.

(The law) will only be delayed by a few weeks, said Roger Karoutchi, the minister in charge of relations with parliament.

UMP party discipline has been severely tested this year, from a controversy over France's return to the military command structure of NATO, to a bill to ease restrictions on Sunday business hours -- which was postponed indefinitely.

The Internet bill, which is heavily supported by the music industry, would give users caught illegally downloading files two warnings and then, after a third violation, have them disconnected from the Internet for up to a year.

Socialist parliamentarian Patrick Bloche called the bill dangerous, useless, inefficient, and very risky for us citizens. Others urged the government not to re-submit it.

Under pressure from a struggling music industry, governments have long been trying to crack down on online file-swapping.

The proposed law is an effective and proportionate way of tackling online copyright infringement and migrating users to the wide variety of legal music services in France, said John Kennedy, chairman and chief executive of IFPI, a music industry group.

Some consumer groups have said that the proposed law could hit the wrong people, and that honest users risked being unfairly punished and forced to prove their innocence if hackers hijacked their computers' identity.

Others worried it would pit artists against their audience.

The music industry has been lobbying for similar laws to be introduced around the world. In January, Irish Internet provider Eircom agreed to disconnect users who download music illegally in a settlement with four major record companies.

(Reporting by Emile Picy; writing by Sophie Hardach; Editing by Mark Trevelyan)