Huawei Technologies Co. and Samsung Electronics Co. Ltd. have agreed to settle a U.S dispute over royalties for patents covering 3G and 4G wireless technology standards.

Both companies asked the U.S. Court of Appeals for the Federal Circuit Feb. 26 to stay proceedings in their patent fight after they reached a settlement agreement Feb. 25, according to a court filing. They’ll submit a joint motion to dismiss the appeal after finalizing settlement terms, according to their filing.

A settlement would end the smartphone makers’ two-year dispute spanning U.S. and Chinese courts, after Huawei sued Samsung for using its patents covering cellular standards without paying licensing fees. The companies didn’t disclose details of their agreement.

The companies were unable to strike a licensing deal through talks that began in 2011. Samsung would owe Huawei more than $3 billion in past royalties and future payments of nearly $400 million in annual royalties, according to Bloomberg Intelligence.

China’s Shenzhen Intermediate People’s Court ruled in January 2018 that Samsung infringed two Huawei patents on 4G standard technology.

Huawei filed a Federal Circuit appeal after the U.S. District Court of Northern California stopped it from enforcing an injunction it won against Samsung in the Shenzhen court until after a U.S. trial on royalty rates. The injunction banned Samsung from making and selling 4G LTE smartphones in China.

The case is Huawei Technologies Co. Ltd. v. Samsung Electronics Co. Ltd., Fed. Cir., No. 18-01979, Joint motion to stay appeal 2/26/19.