Qualcomm will pay $891 million to Broadcom in a patent dispute settlement, the chip companies announced today.

The deal will settle all pending litigation between the companies worldwide. The companies were in a state of legal warfare over cell phone and other tech patents in the U.S., Europe and Korea. San Diego, Calif.-based Qualcomm will pay the money to Irvine, Calif.-based Broadcom over four years. Qualcomm will make the first $200 million payment in the second quarter.

Each company will now have limited rights to each other’s patent portfolios, allowing them to engineer products without fear of litigation. Under the deal, Qualcomm will not have to make any changes in its licensing strategy for 3G or 4G cell phone chips.

Qualcomm does not have the right to use any of Broadcom’s patents in non-phone applications. Qualcomm agreed not to sue any of Broadcom’s customers for patents related to non-cell phone products.

Paul E. Jacobs, chairman and CEO of Qualcomm, and Scott A. McGregor, president and CEO of Broadcom, said in a joint statement that the settlement will be good for customers and allow both companies to innovate. The deal ends years of bitter fighting and could mean that innovation in cell phones will now move faster. And it will let the rivals focus on bigger competitors, such as Texas Instruments and Intel.