Open Source software may be given away for free but its developers have been fighting for legal protection for their creations.

And they have now won a landmark legal victory in the United States.

A US Federals Appeal Court ruled that open source software should be given the same copyright protection as licensed software that you have to pay for.

The ruling overturns an earlier judgement by a lower court.

This particular case, which is expected to have ramifications thoughout the software developing world, concerned free software used in model trains.

A model train fan and developer, Robert Jacobsen, had written and then released code under an Artistic Licence.

As the Beeb explains, this means that anyone could use the free code but had to attribute the author, highlight the original source of the files and explain how the code had been modified.

Jacobsen, who manages the open source software group Java Model Railroad Interface, went to court when he found out that commercial software developer Matthew Katzer and his company had used his code but then went on to develop software from it which they sold.

Jabobsen accused the company of ignoring the terms of the Artistic Licence and therefore infringing his copyright.

The first court ruled against him arguing the license was "intentionally broad" and suggested he claimed breach of contract instead, but legal experts in the States suggest that it is far harder to win damages and seek injunctions under contract law (than federal copyright law).

But now the US appeals court "determined that the terms of the Artistic License are enforceable copyright conditions".

"Copyright holders who engage in open source licensing have the right to control the modification and distribution of copyrighted materials", Judge Jeffrey White wrote in his 15-page decision.

"Open source licensing has become a widely used method of creative collaboration that serves to advance the arts and sciences in a manner and at a pace few could have imagined just a few decades ago", he added.

The ruling is being welcomed by open source developers.

Mark Radcliffe of the Open Source Initiative told the press: "Although the reasoning is limited to the Artistic Licence and the interpretation of each open source licence will depend on the wording of its provisions, this decision is a welcome change".