Apple and Samsung have called a truce on most of their patent disputes, a development that should help end an acrimonious dust-up between the two tech giants that has festered for years.

The companies have agreed to abandon patent lawsuits outside the United States, ending legal battles in countries including Australia, Japan, South Korea and the United Kingdom.

"Samsung and Apple have agreed to drop all litigation between the two companies outside the United States," the companies said in a joint statement. "This agreement does not involve any licensing arrangements, and the companies are continuing to pursue the existing cases in U.S. courts."

Apple (AAPL) and Samsung have been engaged in tit-for-tat series of lawsuits since 2011. Many of the disputes involved the design of smartphones, a lucrative sector that the two companies dominate.

Apple had accused Samsung of multiple patent infringements, including on the hardware design of the iPhone. Samsung alleged that "all generations" of the iPhone and iPad infringe on its own patents.

Related: Xiaomi just took over China - is the U.S. next?

The sprawling legal battles were enormously complex, and the stakes were high. A victory in court could force the loser to pull its products from the market.

While there are signs that tensions are easing, the two companies aren't completely giving up the fight. Lawsuits in the U.S., where Apple has triumphed in two cases, will continue. Apple has been awarded about $1 billion in those cases, far less than the company was asking. Samsung is appealing the decisions.

Samsung, in particular, still faces significant legal challenges over patents.

Earlier this week, Microsoft (MSFT) filed a lawsuit against Samsung, claiming the South Korean firm owes it money as part of a patent-sharing agreement the two companies negotiated in 2011.