James Martin/CNET

BlackBerry's tired of waiting for Facebook's friend request. So it sued.

The Canadian business software provider and former phone giant sued the world's largest social network in a Los Angeles court.

The suit, filed Tuesday, targets Facebook and its Instagram photo sharing app and WhatsApp messaging service, BlackBerry said in a statement. It came after what BlackBerry said was "several years of dialogue" with the social network. The suit isn't available online yet.

Now playing: Watch this: BlackBerry sues Facebook over messaging patents

"As a cybersecurity and embedded software leader, BlackBerry's view is that Facebook, Instagram, and WhatsApp could make great partners in our drive toward a securely connected future, and we continue to hold this door open to them," BlackBerry said.

Facebook isn't in the mood to come knocking.

"Blackberry's suit sadly reflects the current state of its messaging business," said Paul Grewal, deputy general counsel for Facebook. "Having abandoned its efforts to innovate, Blackberry is now looking to tax the innovation of others. We intend to fight."

Reuters initially reported the suit.

BlackBerry, which nearly a decade ago was one of the world's largest smartphone makers, has in the past several years retreated into supplying software and services for corporate and government clients. In addition, its QNX software also powers many in-car systems, and the company is placing a bet on smart cars with partner and mobile chip giant Qualcomm.

BlackBerry phones remain, but only because Chinese consumer electronics maker TCL, best known for budget televisions, pays BlackBerry for the rights to use its name. While BlackBerry works with TCL on the software experience on the device, TCL's BlackBerry Mobile division handles the hardware.

One of the core services found on its older phones is BlackBerry Messenger (BBM), a secure way to exchange text and images and an early competitor to the likes of WhatsApp. BBM was an attractive form of global communication, particularly in countries where text message rates were high.

But in the years since, Facebook and its subsidiaries have become go-to services replacing many of BBM's functions. Facebook alone is the world's largest social network, with more than 2 billion people logging in each month. WhatsApp, meanwhile, has become a de facto text message replacement, garnering 1.5 billion active users, according to data compiled by Statista. And don't forget Instagram, with photo sharing and messaging that attract more than 800 million people each month.

BlackBerry is no stranger to litigation, having settled its own allegations of infringing on other tech patents with the likes of Nokia and NTP. Last year, it turned around and accused Nokia of patent infringement. Four years ago, when BlackBerry was still making phones, it sued a keyboard case maker backed by Ryan Seacrest because the accessory looked too much like its trademark keyboard.

The court filing is below.

First published, March 6 at 10:28 a.m. PT.

Update, 12:09 p.m. PT: To include a response from Facebook.

Update, March 7 at 6:57 a.m. PT: Adds the court filing.

Logging Out: Welcome to the crossroads of online life and the afterlife.

Tech Enabled: CNET chronicles tech's role in providing new kinds of accessibility.