A tiny implantable drug pump designed to prevent infection by the human immunodeficiency virus (HIV) is getting a big boost from the Bill and Melinda Gates Foundation. The Gates Foundation is investing $140 million to help Intarcia Therapeutics, a Boston-based biopharmaceutical company, develop the implantable pump.

The pump uses Intarcia’s Medici Drug Delivery System, which delivers HIV preventive medicine to healthy patients. The miniature pump can hold six or 12 months’ supply of medicine and is designed to deliver microdoses continuously to patients. The pump is embedded just under the dermal layer of the patients’ skin in an in-office procedure by a trained physician.

The investment has been divided into two parts. The first $50 million is for an equity stake in the company. The other $90 million is tied to grants for Intarcia achieving certain milestones in developing the device. Additional grants in the future may also be in the cards. The money is part of $1.5 billion fund created by the Gates Foundation to invest in private sector technologies that advance the foundation’s mission.

According to UNAIDS, 2.1 million people became newly infected with HIV worldwide in 2015. There is no cure for the disease. HIV is an epidemic in sub-Saharan Africa. An estimated 24.7 million people in the region were living with HIV in 2013.

Health officials try to prevent the spread of HIV through a strategy called pre-exposure prophylaxis (PrEP). Under this strategy, people who are at a very high risk for HIV can take HIV medicines daily to lower the chances of becoming infected. A daily dose of PrEP can reduce the risk of contracting HIV from sex by more than 90 percent.

Getting patients to take the drug daily is critical for preventing HIV effectively, but it is difficult for patients to maintain the regiment. According to the Centers for Disease Control and Prevention, PrEP is “highly effective for preventing HIV if used as prescribed, but it is much less effective when not taken consistently.”

The device is still in development and will take several more years to reach the market. The plan is for the device to be sold in the United States and other developed nations, as well as ensuring access to the pump in the developing world. Which HIV preventive drug to use in the pump has not yet been decided.

Intarcia is also developing a version of the pump to treat type 2 diabetes. In November, the company filed an application with the US Food and Drug Administration to market the device, called the ITCA 650.

Intarcia has raised $206 million in a second close of its Series EE financing. The Boston-based company previously closed a $215 million round in September. According to a statement, the company plans a final close in the first quarter.

Get Analysts' Upgrades and Downgrades Daily - Enter your email address below to receive a concise daily summary of analysts' upgrades, downgrades and new coverage with MarketBeat.com's FREE daily email newsletter.