The goal is to boost efforts to eliminate malaria by making it easier for people to get the medication they need
The research, funded by the Bill and Melinda Gates Foundation, delivered the anti-parasitic and anti-malaria drug ivermectin to hundreds of pigs and dogs via a capsule that temporarily expands in the stomach so it cannot be passed to the intestines until the drug contents are gone.
It is scheduled to move into human trials next year.
"We have a lot of confidence in the safety of these dosage forms," said lead author Andrew Bellinger, formerly a researcher at the Massachusetts Institute of Technology (MIT) and now a cardiologist at Brigham and Women's Hospital.
The goal is to boost efforts to eliminate malaria by making it easier for people to get the medication they need, and avoid having to remember a daily pill.
"Getting patients to take medicine day after day after day is really challenging," said Bellinger.
"If the medicine could be effective for a long period of time, you could radically improve the efficacy of your mass drug administration campaigns."
Researcher Robert Langer, also of MIT, said the system has a wealth of potential uses.
A new company, Lyndra, has also been launched by researchers and others to develop the technology for use against neuropsychiatric disorders, HIV, diabetes and epilepsy.
"Until now, oral drugs would almost never last for more than a day," said Langer.
"This really opens the door to ultra-long-lasting oral systems, which could have an effect on all kinds of diseases, such as Alzheimer's or mental health disorders."
The capsule is "stable enough to survive the harsh environment of the stomach" and comes in a star-shape with six arms that can be folded inward and encased for easy swallowing.
Each arm is loaded with medicine, and these arms open and unfold inside the stomach as acid destroys the capsule's outer layer.
The star stays inside the stomach as the medicine is gradually released, then breaks apart and travels through the digestive tract.
The findings are published in the journal Science Translational Medicine.