WATERLOO – BlackBerry Ltd. has sold the majority of its Canadian real estate holdings to a San Francisco-based real investment firm for $305 million.

Spear Street Capital is buying the properties – located in Waterloo, Cambridge, Mississauga and Ottawa – and will lease back some of the buildings to BlackBerry.

"BlackBerry will lease back a portion of the space as the company continues to have a strong presence in Canada with Waterloo continuing as the home of its global headquarters," BlackBerry said in a news release Monday.

The transaction includes buildings containing more than three million square feet of space as well as vacant land.

BlackBerry announced in March that it had reached a deal to sell the real estate, but it didn't provide any details until Monday.

The Waterloo-based mobile communications company has said selling the properties allows it to improve operational efficiencies, optimize resource usage and shift resources to support operations as its business continues to evolve.

BlackBerry has undertaken massive downsizing in response to plunging market share for its smartphones. In the latest wave of layoffs, announced last September, it is cutting 4,500 jobs or 40 per cent of its global workforce.

In the deal with Spear Street, BlackBerry said the sale of properties valued at about 80 per cent of the total transaction price will be completed later this month. The sale of the remaining properties will be completed this fall.

Spear Street was launched in 2001 and owns office properties across the United States.

In December, BlackBerry announced that it had sold five buildings at Columbia and Phillip streets in Waterloo to the University of Waterloo for $41 million.