"Although Samsung has a right to compete, it does not have a right to compete unfairly, by flooding the market with infringing products," Koh wrote on Tuesday, adding the order should become effective once Apple posts a $2.6 million bond to protect against damages suffered by Samsung if the injunction is later found to have been wrong.
Apple has beenengaged into an international patent war since 2010 as it seeks to limit the growth of Google's Android system.
The injunction against Samsung comes less than a week after Apple suffered a setback when a federal judge in Chicago dismissed its patent claims against Google's Motorola Mobility unit. Judge Richard Posner ruled that an injunction barring the sale of Motorola smartphones would harm consumers.
Samsung said Wednesday it is disappointed with the court decision.
"Samsung is disappointed with the U.S. District Court for the Northern District of California's decision," the company said in a statement. "We believe today's ruling will ultimately reduce the availability of superior technological features to consumers in the United States."
The company pledged to take legal action but stressed the injunction is unlikely to hurt its business.
In July 2011, Apple filed a complaint with the San Jose district court in a bid to ban sales of Samsung's three Galaxy smartphones and the Galaxy Tab 10.1.
The iPhone maker claimed Samsung had violated patents, including a patent related to the rectangular shape with four evenly rounded corners, a flat glass-like surface without any ornamentation and a rim surrounding the front surface.
The case in U.S. District Court, Northern District of California, is Apple Inc v. Samsung Electronics Co Ltd et al, 11-1846.