SAN FRANCISCO — Samsung and its lawyers at Quinn Emanuel Urquhart & Sullivan must pay more than $2 million to compensate Apple and Nokia for the firestorm of litigation that followed a leak of confidential business information, a federal judge ruled Friday.

Laying to rest one of the last offshoots of Apple and Samsung’s original patent brawl, U.S. Magistrate Judge Paul Grewal ordered the South Korean company and its law firm to fork over $1,145,027 for Nokia’s attorney fees and costs as well as $893,825 for Apple’s. Grewal ruled in January that Quinn Emanuel deserved sanctions for giving Samsung details about the terms of a license struck between Apple and Nokia.