SANTA ANA, Calif. – A federal judge ordered toy giant Mattel Inc. to post a $315 million bond while it appeals a $310 million award to rival toymaker MGA Entertainment Inc. in a long-running legal dispute over who owns the copyright to the popular Bratz doll line. In his ruling Tuesday, U.S. District Judge David O. Carter gave Mattel until Aug. 23 to post the bond.

MGA had wanted Mattel to post an even higher amount as a guarantee it could pay the $310 million should it lose on appeal.

Earlier this month, Carter ordered Mattel to pay nearly $310 million in damages and attorney fees after a jury found that the company stole trade secrets from MGA.

It was a surprising twist in the case, which originated in 2004 when Mattel first sued over ownership of MGA’s flagship Bratz doll line.