Apple and HTC announced a wide-reaching patent licensing agreement this evening that includes settlement of all current litigation between the two companies.

The two companies, which have been locked in a series of bitter patent disputes over the last two years, agreed to a 10-year joint licensing agreement for all current and future patents from both companies, according to a brief statement issued this evening. Financial terms of the settlement were not released.

The chief executives of both companies issued statements welcoming the settlement.

"We are glad to have reached a settlement with HTC," Apple CEO Tim Cook said in a statement, while HTC CEO Peter Chou said, "HTC is pleased to have resolved its dispute with Apple."

The relatively brief but active legal dispute between the two companies began in March 2010, when Apple filed a complaint against HTC with the U.S. International Trade Commission, saying the Taiwan-based company violated 10 of its patents. However, an administrative judge with the ITC -- a federal agency with the power to enforce bans on products shipping to the U.S. -- found only two violations in June 2011.

Two months after Apple's complaint, HTC accused Apple of infringing on five patents related to its mobile technology and asked the ITC to stop the import and sale of Apple's iPad, iPod, and iPhone. In August 2011, HTC filed a lawsuit in the U.S. District Court of Delaware, claiming that Apple violated two Wi-Fi-related patents by selling its line of Mac computers, iPads, iPods, iPhones and other devices and sought an import ban on the devices.

However, HTC was dealt a setback in December 2011 when the ITC ruled that HTC infringed on Apple's patent for "data tapping," -- techniques that automatically format documents to allow, for instance, a dialer program to pop up when a phone number appears. The quasi-judicial body said in its ruling that it would impose an import ban on some of HTC's products if the feature wasn't removed by April 19, 2012.

Immediately after that ruling, HTC announced it would soon remove the feature from "all of our phones."

Apple recently won a ruling in another case with HTC when a judge dismissed five patents that HTC tried to assert -- patents that had been borrowed from Google. The patents, cited in a case with the ITC, had been loaned to HTC last summer in an apparent attempt to beef up Android equipment makers without getting Google directly involved.

Previous Apple attempts to keep HTC products from the U.S. have had mixed results. After the ITC ruled in December that HTC infringed on Apple's patent for "data tapping" techniques, imports of HTC's One X and Evo 4G LTE were held up in May by U.S. Customs, which had to inspect the devices to ensure they were not infringing on Apple's patent. However, after a couple of weeks in limbo, the phones were allowed to enter the U.S.