Motorola Inc and BlackBerry maker Research In Motion Ltd have reached a technology licensing agreement, ending more than two years of litigation with each other, the companies said on Friday.

The deal could set the stage for both companies to compete better against rivals such as iPhone maker Apple Inc as the wireless industry moves to the next generation of high-speed mobile data services.

Illinois-based Motorola and Canada's RIM, which have been sparring over technology patents since a previous pact expired in December 2007, said they agreed to a cross-licensing agreement on intellectual property rights, allowing them to use each other's technology.

The pact involves an upfront payment and on-going royalties to Motorola as well as the transfer of certain patents between the companies, they said without disclosing financial terms.

The agreement covers several different types of high-speed wireless technologies including Wi-Fi, the popular short-range radio technology, and emerging fourth generation (4G) standards.

This could lead the way for both companies to develop 4G products as some of the biggest U.S. service providers are currently working on upgrading their services to 4G.

Verizon Wireless, a venture of Verizon Communications and Vodafone Group Plc, has said that both Motorola and RIM may be among the first to sell 4G handsets in early 2011.

FIGHTING HISTORY

It is a common practice for technology companies to engage in prolonged legal battles in the hope of gaining the upper hand in negotiations for licensing agreements.

For example Apple and smaller rival HTC Corp are currently engaged in a bitter legal battle over patents.

While RIM has a strong following among business customers, both the Canadian company and Motorola have lost out to rivals such as iPhone in recent years.

The agreement follows a complaint filed by Motorola against RIM in January at the U.S. International Trade Commission to prohibit BlackBerry sales in the United States, traditionally RIM's most important market.

Motorola had complained that most RIM products infringed its patents.

The companies have been in court battles with each other since February 2008 due to their failure to renew a pact that had allowed them to use each others' technology.

After the news Motorola shares were up 2.3 percent at $7.00 on the New York Stock Exchange. RIM's U.S. shares were up 1.2 percent at $59.79 on Nasdaq.

(Reporting by Ritsuko Ando and Sinead Carew, editing by Gerald E. McCormick, Phil Berlowitz)