Pharmaceutical companies do some creative things to try to extend their patents, but Allergan may have just taken the cake.

The drug giant said Friday it transferred all the patents for its billion-dollar eye drug Restasis to the Saint Regis Mohawk Tribe, which then granted it back an exclusive license.

For its trouble, the tribe will get $13.75 million from Allergan, plus potentially $15 million in annual royalties. Allergan’s stock rose 1.8 percent in trading Friday.

Why? Restasis is facing multiple patent challenges, including under a system known as inter partes review, or IPR.

The tribe, Allergan says, holds sovereign immunity against these kinds of legal challenges, and thus is now filing a motion to dismiss the IPR.

The result: Allergan potentially gets a legal challenge off its back.

“I believe it’s novel,” Allergan CEO Brent Saunders told CNBC in a telephone interview after the agreement was announced.

“The actions today really allow us to focus the defense of the Restasis patents in the federal court system and avoid the double jeopardy created by the IPR system.”

The Saint Regis Mohawk Tribe agreement doesn’t affect Allergan’s patent battles in the federal court system. That patent litigation, under the more traditional challenge through abbreviated new drug applications – or ANDAs – just wrapped a five-day trial in Federal District Court.

While there’s no precedent for this kind of move in the pharmaceutical industry, at least that Saunders said he was aware of, it has been done before with state universities, said Bob Bailey, Allergan’s chief legal officer.

Bailey said that the tribe, working with law firm Shore Chan DePumpo, approached Allergan in early August about the idea.

“My first reaction was: ‘This is brilliant,'” Bailey said Friday.

The pharmaceutical industry has railed against the IPR system for patent challenges, ever since hedge fund manager Kyle Bass used it to launch a series of attacks against drugmakers, while shorting their stocks.

Saunders pointed out the legality of the IPR process has been challenged and is expected to be heard by the Supreme Court this fall.

The Saint Regis Mohawk Tribe called the agreement “a viable and sound opportunity” in its joint statement with Allergan Friday.

“We realize that we cannot depend solely on casino revenues and, in order for us to be self-reliant, we must enter into diverse business sectors to address the chronically unmet needs of the Akwesasne community; such as housing, employment, education, healthcare, culture and language preservation,” the Saint Regis Mohawk Tribal Council said.

So should we expect to see more such partnerships from pharma? Evercore ISI analyst Umer Raffat says, potentially, yes.

“Allergan just made a legal move that is extremely important for the industry to track,” Raffat wrote in a research note. He said if Allergan’s partnership holds up in the courts, three other companies may seek to do the same: Eli Lilly, Amgen, and Pfizer.