Samsung fought until the bitter end to avoid paying Apple, but the company now says it will finally hand over the more than $548 million it owes for infringing the patents and designs of its biggest smartphone rival.

In papers filed in federal court in San Jose, California on Thursday, Samsung Electronics Co Ltd said it will make the payment by Dec. 14 if Apple Inc sends an invoice on Friday.

Asked if it had done so, Apple declined to comment on Friday.

The payment comes after a U.S. appeals court last May reduced a $930 million judgment against Samsung by $382 million, stemming from a 2012 verdict for infringing Apple patents and copying the look of the iPhone.

Another trial over remaining damages relating to some of Samsung’s infringing products in the case is set to go ahead next spring.

Even though the U.S. Court of Appeals for the Federal Circuit in Washington, D.C. had authorized damages to Apple in May, Samsung again appealed the final figure to the same court, and was rebuffed twice more.

Now agreeing to pay, Samsung told the San Jose court that it expects to be reimbursed if it eventually succeeds in a forthcoming appeal to the U.S. Supreme Court over its liability for copying the patented designs of the surface, bezel and user interface of the iPhone, which accounted for $399 million of the total award.

South Korea-based Samsung also said it reserved the right to be reimbursed in the future if a decision by the U.S. Patent and Trademark Office invalidating one of the Apple patents in the case, related to touchscreen gestures, is upheld.

Apple intends to appeal that ruling and said in court documents it “disputes Samsung’s asserted rights to reimbursement.”

“We are disappointed that the court has agreed to proceed with Apple’s grossly exaggerated damages claims regardless of whether the patents are valid,” a Samsung spokeswoman said in a statement.