BlackBerry Ltd., seeking ways to stem revenue declines, is dusting off its old patents and asking other companies to pay up for using technology BlackBerry claims it invented years ago.

The latest skirmish broke out on Tuesday, when BlackBerry sued Facebook Inc. in federal court in Los Angeles, claiming the social media giant has built swaths of its empire on messaging technology invented by the former smartphone maker when Mark Zuckerberg was still living in a Harvard University dorm room. The move might seem strange, especially at a time when smartphone messaging apps are ubiquitous and don’t seem to be all that different from one another.

But BlackBerry said it laid the foundation for the world of messaging apps now dominated by Facebook, China’s Tencent Holdings Ltd. and Japan’s Line Corp. with its BBM app, which helped draw millions to the company’s phones in the mid-2000s. BlackBerry’s complaint claims the firm invented core aspects of modern messaging, such as notification icons, and when and how time stamps show up in a thread.

The stakes for BlackBerry are real. In the last two years, patents have become an essential and growing part of its business. Licensing revenue has more than tripled to $50 million a quarter since summer 2016, soon after the company first broke it out. At the end of 2017, patents made up 22 percent of total revenue, up from just 6.3 percent in May 2016.

An Untapped Resource

Chief Executive Officer John Chen has hailed BlackBerry’s vast library of patents as an untapped resource that will help him turn the company around. He justified getting out of the phone business by signing deals with manufacturers in other parts of the world to use the BlackBerry brand on their own phones.

“After the fall of the BlackBerry handset, the company is shifting to other revenue sources, including monetizing its patent assets,” said Matt Larson, an analyst with Bloomberg Intelligence. Larson said it’s likely BlackBerry will win some sort of settlement in this case, but it may take a while.

“It’s a very difficult business,” he said. “Litigation trends in the U.S. and abroad have made it difficult for patent owners to enforce their rights in court, so bringing licensing customers to the table can be a slow and expensive process.”

In 2014, the U.S. Supreme Court made it much harder to enforce software patents, essentially saying that taking established ways of doing business and putting them on a computer shouldn’t be considered new intellectual property. BlackBerry seems to have prepared its suit with this in mind by laying out a 117-page complaint against Facebook explaining why the patents it holds were truly innovative at the time they were invented, said Jim Wallace, a lawyer who represented NTP Inc. in a major court battle against BlackBerry in the early 2000s.

“They’ve done everything they can to send a message to the defendants and the world: ‘We’ve got strong patents and you better not screw with us,”‘ Wallace said. The NTP suit ended in 2006 with BlackBerry paying $612.5 million.

A Big Fight Brewing

BlackBerry has a strong claim that Facebook infringed its intellectual property, a spokeswoman said in an email. The company had been trying to do a licensing deal with Facebook for “several years,” before deciding to sue, the spokeswoman said.

“BlackBerry’s suit sadly reflects the current state of its messaging business,” Paul Grewal, Facebook’s deputy general counsel, said in a statement. “Having abandoned its efforts to innovate, BlackBerry is now looking to tax the innovation of others. We intend to fight.”

The tactic has paid off for BlackBerry in the past. It secured ongoing payments from Cisco Systems Inc. in 2015 and phone maker Blu Products last October. Last month, it settled a fight with communications tech firm Avaya Holdings Corp., though terms of the deal weren’t disclosed.

BlackBerry settled its fights with Avaya, Blu and Cisco before the cases went to trial, and that’s likely to happen here too, said lawyer Mark Schonfeld of Burns & Levinson in Boston, who specializes in software-patent litigation.

BlackBerry has “one of the strongest patent portfolios in the United States in certain spaces,” Schonfeld said, citing patents for wireless networks and digital information processing.

Yet the fight, even if it results in a settlement, may concern BlackBerry investors, said Michael Gordon, a legal analyst with CFRA, a New York-based forensic accounting and legal research firm.

“The more that licensing companies have to litigate, the less the market likes that because litigation is expensive,” Gordon said. “The fact that they had to resort to litigation against a large company with a lot of resources is not a particularly bullish sign.”

And Facebook is a formidable opponent.

“Facebook certainly can afford to fight this and fight it vigorously and there will be other companies looking to Facebook to see how they react,” Schonfeld said.

The lawsuit may be a declaration that BlackBerry expects other companies to reach licensing deals.

The lawsuit is “not just written for Facebook; it’s written for others against whom they are going to proceed,” Schonfeld said. “A complaint of this detail is extremely unusual, and is probably meant to be used and understood, to create apprehension among other companies.”

The case is BlackBerry Ltd. V. Facebook Inc., 18-1844, U.S. District Court for the Central District of California (Los Angeles).