U.S. Federal Judge Lucy Koh has rejected Apple’s attempt to have the sale of Samsung’s Galaxy smartphones and tablets halted, reports Reuters.

The attempt was made as a preliminary injunction attempt. This would mean that while the subsequent patent case was being tried (which can take up to 18 months) Samsung would not be able to sell many Galaxy products in its largest market.

This is obviously a huge initial win for Samsung. The case hasn’t yet begun, but an injunction now would harm its burgeoning Galaxy business in the U.S. significantly.

Judge Koh had previously stated that Samsung did infringe on Apple’s patents, although she said that Apple might have a problem proving that they were valid in the U.S.. “It is not clear that an injunction on Samsung’s accused devices,” said Koh in this ruling, “would prevent Apple from being irreparably harmed.”

In an earlier hearing, Koh seemed to be aware of the fact that the two devices were very similar in appearance. At one point, she held both tablets over her head and asked the lawyers from Samsung and Apple to tell her which one was which. Dan Levine, reporting for Reuters, said that it “took them a while to do so.”

She kept stating how similar the two tablets appeared with regards to thinness and sloping edges.

The technical patents that Apple is asserting in the case include U.S. Patent No. 7,479,949, a touch screen patent, U.S. Patent No. RE41,922 that patents the equipment and practices used for “providing translucent images on a computer display”, U.S. Patent No. 7,863,533, a patent that refers to a switch similar to the one that the iPhone uses for volume, U.S. Patent No, 7,789,697 and U.S. Patent N. 7,912,501 which refer to the way that Apple’s devices autodetect devices being plugged into a headset jack.

There are also two design patents that refer to the look and feel of iDevices, these are U.S. Design Patent D558,757 and U.S. Design Patent No. D618,678.

The legal back and forth between Apple and Samsung continues but the basics are that each company is matching the other move-for-move. Apple’s complaint with the ITC is a mirror of the complaint filed by Samsung to block the import of Apple’s iPhone and iPad.

So at this point Apple’s application for a motion for preliminary injunction against the sale of Samsung products like the Galaxy S 4G, Infuse 4G, Droid Charge and Galaxy Tab 10.1 until a patent infringement trial can be held is denied. The trial will still be held, however, so Samsung isn’t out of hot water yet.