Members of the European Parliament (MEPs) have voted overwhelmingly to reject proposed legislation that critics argued would have allowed the widespread patenting of software in Europe.

The MEPs voted by 648 votes to 18 to reject the proposed directive on computer-implemented inventions, dubbed the software patents directive by critics.

It has been one of the most controversial pieces of legislation in the history of the EU. Supporters said the directive was essential to harmonise patent laws across the 25 EU member states. Opponents, including many from the open source software community, argued that it would have allowed a wide range of computer programs to be patented and given large technology vendors too much power in the software market.

The decision to reject the directive brings to an end four years of work on the proposal, and the Commission has said it will not try to draft a new version.

Without the directive, "patents for computer-implemented inventions will continue to be issued by national patent offices and the European Patent Office," EU Commissioner Benita Ferrero-Waldner said.

The rejection of the directive means there will be "no harmonization at EU level," he said, drawing cheers from some MEPs.

Trouble emerged for the directive Tuesday evening after one of the biggest political groups, the European People's Party, announced that it would vote for rejection rather than risk approving a long list of amendments to the legislation, which it feared would drastically restrict the scope of what can be patented.

Ahead of the vote, both supporters and opponents of the directive said rejection may be the best result.

"Rejection would be a wise decision because [approving the directive with the amendments] could have narrowed the scope of patenting," said Mark MacGann, director-general of the European Information Technology and Communications Association (EICTA), an industry group representing big vendors including Microsoft, Nokia and Siemens.

EICTA had opposed the amendments to the directive, which sought to ensure that patents could not be applied to software including data processing. EICTA and other industry groups argued that the restrictions went too far and would have denied patent protection to many inventions that used a computer in their operation.