By Alastair Sharp and Jim Finkle

TORONTO/BOSTON (Reuters) - BlackBerry Ltd <BB.TO><BBRY.O> has signed a deal to work directly with Ford Motor Co <F.N> to expand the carmaker's use of its QNX secure operating system, the Canadian technology company said on Monday, as Ford develops increasingly automated vehicles.

The deal with Ford is the first BlackBerry has done directly with a major automaker, though it currently sells its technology to auto industry suppliers.

The company is betting its future on expanding sales of software products, including to automakers and other manufacturers, after largely ceding the smartphone market to rivals including Apple Inc <AAPL.O>, Alphabet's <GOOGL.O> Google and Samsung Electronics Co Ltd <005930.KS>.

Panasonic Automotive currently uses QNX software in the Sync 3 infotainment console that it supplies to Ford.

BlackBerry is hoping the new deal will expand use of BlackBerry's software in Ford vehicles as the two companies identify other systems where it might be used.

"We can form the basis of the entire vehicle all the way from autonomous drive through to infotainment," John Wall, the head of BlackBerry's QNX unit, said in a phone interview.

Ford is ramping up its driverless vehicle efforts and plans to offer a fully automated vehicle for commercial ride-sharing in 2021, it announced in August.

QNX's software is certified for use in autonomous driving and active safety systems, according to Wall.

"In the initial engagements you can think of an expansion into the cockpit; telematics, infotainment, cluster," Wall said.

BlackBerry and Ford declined to say how QNX might be rolled out into new systems or discuss financial terms of the deal.

A dedicated team of QNX engineers based in Ottawa and Waterloo will work with Ford to expand the carmaker's use of the Neutrino industrial operating system, as well as an overarching program that can control other operating systems and related security technology, BlackBerry said.

"We're providing the plumbing for the vehicle that is both robust and safe and secure to allow the customers to build their applications on top of that," Wall said.

Dan Dodge, who founded QNX in 1982, and stayed on after BlackBerry bought the company in 2010, left QNX at the end of 2015. Bloomberg reported in July that Apple hired him as part of its own self-driving plans.

(Reporting by Alastair Sharp and Jim Finkle; Editing by Andrew Hay)