Nokia Corp. and Qualcomm Inc. said Wednesday they agreed to settle a high-stakes licensing dispute and end a bitter legal battle that has lasted nearly three years and spanned several continents.

The wireless industry heavyweights said the 15-year licensing deal gives Nokia rights to a wide portfolio of Qualcomm’s patents. Terms were not disclosed.