HTC signed a patent and technology collaboration agreement with Nokia to finally put an end to all legal patent disputes that started in 2012.

The battle between Samsung and Apple is ongoing, but two other key players in the smartphone industry, HTC and Nokia, have come to a mutual settlement. The Taiwanese smartphone maker said on Friday that it has signed a patent and technology collaboration agreement with the Finnish phone maker to end all pending patent disputes between the two tech giants since 2012 and explore "future technology collaboration opportunities," according to Bloomberg.

Though the new deal comes with mutual consent, Microsoft is on the winning side as HTC will make payments to Nokia and collaboration will involve HTC's LTE patent portfolio. This will strengthen the preeminent patent portfolio held by Nokia.

"Nokia has one of the most preeminent patent portfolios in the industry," HTC General Counsel Grace Lei said in a press statement. "As an industry pioneer in smartphones with a strong patent portfolio, HTC is pleased to come to this agreement, which will enable us to stay focused on innovation for consumers."

The collaboration agreement between the two former tech giants, Nokia, which was once the largest mobile phone maker and HTC, which once ruled the smartphone industry, can eventually result in a competitive smartphone entry.

"We are very pleased to have reached a settlement and collaboration agreement with HTC, which is a long standing licensee for Nokia's standards essential patents," Nokia's chief intellectual property officer, Paul Melin, said in a statement. "This agreement validates Nokia's implementation patents and enables us to focus on further licensing opportunities."

Nokia initially took a swing at HTC in 2012, when it found HTC violating its patents. The Finnish company filed more than 50 lawsuits across the world and HTC was found guilty of violating four Nokia patents. In December last year, Supreme Court in U.K. banned the sales of HTC One Mini for violating one of Nokia's patents called "modulator structure for a transmitter and a mobile station."