New York CNN Business  — 

For more than two years, Apple and Qualcomm have been locked in a legal battle with billions of dollars at stake.

On Monday, the long-term partnersare once again heading to court. Apple (AAPL) has alleged Qualcomm (QCOM), which made crucial chips for the iPhone, charged an unfair amount to license its patents.

Qualcomm could be on the hook for as much as $27 billion in damages for chargingApple and its suppliers too much for licensing its patents that allow smartphones to place calls and connect to the internet. Meanwhile, Qualcomm is seeking over $7 billion in unpaid royalties, in addition to other damages totaling billions of dollars.

The partnership provided a major source of revenue for Qualcomm, which earned money for every iPhone sold. But the relationship soured in recent years following a series of back-and-forth lawsuits.

Apple CEO Tim Cook is expected to give testimony during the latest trial, which could last between four and six weeks in San Diego.

“The implications here are not just for Apple and Qualcomm, but for Qualcomm’s licensing arrangements with other firms around the world, too,” said Mark Patterson, a law professor at Fordham University School of Law. “The tens of billions of dollars at issue for Apple and Qualcomm are actually only a piece of what this case affects.”

The case could potentially be significant for Qualcomm’s business prospects, according to Patterson. For example, it could result in rulings for Qualcomm’s licensing practices in general if it requires the company to limit the amount it can charge for licensing its patents.

The companies have sued one another in courts around the world, and both sides have won cases along the way.

The legal fight began in January 2017 when Apple (AAPL) sued Qualcomm (QCOM)for nearly $1 billion. Apple (AAPL)accused Qualcomm (QCOM) of charging “excessive royalties” and withholding payments in retaliation for Apple (AAPL) cooperating with a South Korean investigation into the chipmaker.

In January 2018, European antitrust officials ordered Qualcomm to pay a $1.2 billion fine. The European Commission said Qualcomm defied EU regulations by paying billions to Apple to not use chips made by its rivals.

The companies are also suing each other in several other patent disputes. In one case, Qualcomm asked a US federal judge to ban the sale of iPhones. Last June, a judge in the International Trade Commission found that Apple had violated one of Qualcomm’s patents for battery-saving tech.

Last summer, Qualcomm said it expects Apple to not put its modem chips in the next generation of iPhones.Following the announcement, Qualcomm cut its profit estimates.

However, during the US Federal Trade Commission’s trial against Qualcomm in January, Apple Chief Operating Officer Jeff Williams testified that the chipmaker refused to sell Apple its chips because of the companies’ ongoing legal dispute.

Meanwhile, a US trade judge in March recommended banning some iPhones imported to the United States, saying Apple violated one of Qualcomm’s patents in some of its devices. The judge didn’t specify which iPhones she believes should be banned. However, the judge’s ruling must be reviewed by the International Trade Commission panel and President Donald Trump.

This isn’t the first time the issue has come up.In December, a Chinese court banned the sale and import of most iPhone models following a lawsuit from Qualcomm.

CNN Business’ David Goldman, Rishi Iyengar and Seth Fiegerman contributed reporting.