The Bill & Melinda Gates Foundation received an unexpected boost to its coffers when a stake in a small biotechnology firm, made in 2013 to encourage the company’s work on neglected diseases, sold for $86.7 million -- about 17 times the fund’s original investment.

The windfall from the $5 million stake in Anacor Pharmaceuticals Inc., disclosed Wednesday in a filing, highlights an atypical funding approach that the Gates Foundation, the world’s largest private philanthropy, sometimes uses to spark private-sector research on conditions that mainly afflict poor people and countries, a major focus for the charity.

Non-profit foundations primarily use grants to advance their missions. While the Seattle-based Gates awards about $4 billion annually, it has set aside a pool of about $1.5 billion for “program-related investments,” which include equity stakes, loans and other incentives for companies. The tools allow the foundation to take risks where venture capitalists would normally shy away, said Andrew Farnum, who directs the investment program.

“We’re fighting with one hand behind our backs if we’re only trying to do this by partnering the traditional way with the nonprofit sector,” Farnum said by telephone. “Some of the best technologies are found in the private sector.”

Anacor, based in Palo Alto, California, makes drugs based on boron, an element with a variety of uses that has antimicrobial properties. The company has a drug approved for toenail fungus, Kerydin, and is developing a late-stage candidate treatment for atopic dermatitis, a skin condition. Gates Foundation officials who looked at the company a few years ago thought its expertise could be applied to neglected infectious diseases. Even after Anacor agreed to be taken over by drug giant Pfizer Inc. this week, the work on those diseases will go on.

The Gates Foundation’s deal with Anacor was struck in April, 2013 with two parts: along with the equity stake, equal to 2 percent of the company, the charity agreed to pay the drugmaker $17.7 million. Anacor pledged to broaden its work on treatments for tuberculosis and two parasitic diseases, river blindness and elephantiasis, and create a library of boron-based compounds targeting neglected diseases that would be accessible to other researchers and health officials through the foundation.

“Companies like the validation that comes with the Bill & Melinda Gates Foundation,” Farnum said. “It’s a seal of approval.”

It was the Gates Foundation’s first investment in a publicly traded company for charitable purposes. The fund later increased its payment by $4.4 million and extended the agreement from three years to four, while Anacor took on research into another parasitic disease, called cryptosporidiosis.

Rapid Payoff

The bet began to pay off rapidly as Kerydin came to market and Anacor’s shares rose. In November 2015, the charity sold all but 1 percent of its holdings, according to the filing by the Gates Foundation. The organization didn’t provide exact dates and prices for the transactions. The shares slumped from December through March, then soared Monday after Pfizer agreed to buy the company for $5.2 billion.