BlackBerry Ltd's shares rose 4 percent in early trading on Tuesday after the company said it would provide security for one-time rival Microsoft Corp's MSFT.O flagship Office apps.

The deal reflects a push by companies to ramp up their cybersecurity capabilities following a wave of recent high-profile data breaches.

"Even though BlackBerry no longer dominates the smartphone hardware market, they are still considered a leader in mobile security software," Nomura Instinet analyst Christopher Eberle said.

BlackBerry and Microsoft were bitter rivals until both decided to focus their businesses elsewhere after losing out in the fiercely competitive smartphone market.

Microsoft has concentrated on cloud computing, while BlackBerry has moved away from selling its own phones to providing software and security to others' devices.

As part of the partnership, the Canadian software maker's platform, BlackBerry Enterprise Bridge, will allow businesses to securely access Microsoft's apps such as Excel, Word and PowerPoint on smartphones. 

"Microsoft's core Exchange/Outlook customer base is commercial, including government and regulated industries," Bernstein analyst Mark Moerdler said. "These customers were the big users of BlackBerry."

BlackBerry's services such its mobile application developing tool BlackBerry Dynamics and Workspaces will be available on Microsoft's cloud computing platform Azure, the companies said.

BlackBerry's shares were up 4 percent at C$17.32 in Toronto, while Microsoft was marginally higher at $93.07 in early trading on the Nasdaq.

(Reporting by Yashaswini Swamynathan and Arjun Panchadar in Bengaluru; Editing by Arun Koyyur and Saumyadeb Chakrabarty) ((yashaswini.swamynathan@thomsonreuters.com; within U.S. +1 646 223 8780, outside U.S. +91 80 6749 2405; Reuters Messaging: yashaswini.swamynathan.thomsonreuters.com@reuters.net))