SAN FRANCISCO — At $1.05 billion, the jury’s award last August for Apple Inc. in its smartphone patent war against Samsung Electronics Co. stood as one of the largest ever in a patent infringement case.

But on Friday U.S. District Judge Lucy Koh wiped away roughly $450 million in damages based on the jury’s legal errors and ordered a new trial to calculate proper damages against Android-aligned Samsung for copying features of Apple’s iPhone and iPad.