HELSINKI: The world's leading mobile phone maker Nokia said Tuesday its competitor Apple had agreed to pay royalties for using Nokia technology in its devices, ending all of their ongoing patent disputes. “The financial structure of the agreement consists of a one-time payment payable by Apple and on-going royalties to be paid by Apple to Nokia for the term of the agreement,” Nokia said in a statement, adding that the details of the contract were confidential. The deal constitutes a massive victory for Nokia and brings to an end years of tit-for-tat suits that have seen Nokia file 46 complaints against Apple, which has hit back with numerous countersuits against the Finnish company. Nokia said both companies had now agreed to withdraw all complaints they had filed with the US International Trade Commission. “We are very pleased to have Apple join the growing number of Nokia licensees... this settlement demonstrates Nokia's industry leading patent portfolio,” Nokia chief executive Stephen Elop said. The Finnish company, which has been struggling to maintain its position as global market leader, also said the deal should have “a positive financial impact” on its second-quarter performance. Just two weeks ago, Nokia warned that its sales for the quarter would be far worse than previously expected and that it could no longer give a full-year forecast, news which sent its share price to its lowest level since early 1998.