A South Korean court has fined both Apple and Samsung, ruling that each infringed the other's patents in building their mobile devices and banning some of their products from sale in the country.

The Seoul central district court ordered Apple to remove the iPhone 3GS, iPhone 4, iPad 1 and iPad 2 from shelves in South Korea, citing they infringed two of Samsung's telecommunications patents. The court also ruled that Samsung infringed one of Apple's patents related to the screen's bouncing back ability and banned sales of the Galaxy S2 and other products in South Korea.

Sales of devices recently released by Samsung and Apple including the iPhone 4S and the Galaxy S3 smartphones were not affected.

The court also ordered the two parties to pay monetary compensation to each other. Samsung must pay Apple 25m won (£14,000/$22,000) while Apple must pay its rival 40m won (£22,000/$35,000).

The lawsuit is part of a global multibillion dollar fight between the world's two largest smartphone makers. The highest stakes are in the US, where the two companies are locked in a federal court struggle over patents and innovation.

California-based Apple sued Samsung in 2011 in the US, alleging that some of the South Korean company's smartphones and computer tablets are little more than illegal copies of Apple's iPhone and iPad. Samsung denies the allegations and argues that all companies in the industry mimic each other's successes without crossing the legal line.

Apple is suing South Korean-based Samsung for $2.5bn (£1.5bn), making the case one of the biggest technology disputes in history. Jury deliberations are continuing after three weeks of testimony concluded on Wednesday.

Days after Apple filed its suit in the US, Samsung filed a lawsuit on its home turf and in other countries, accusing Apple of breaching its telecommunications patents.