Scientists have developed a “needle pill” that could allow diabetics to take insulin without the need for daily injections.

The pea-sized capsule contains a small needle made of solid, compressed insulin, which is injected into the stomach wall after the capsule has been swallowed.

When tested in pigs, the device worked consistently and was able to deliver equivalent doses of insulin to those required by someone with diabetes.

Giovanni Traverso, an assistant professor at Harvard Medical School-affiliated Brigham and Women’s hospital and a co-author of the study, said: “Our motivation is to make it easier for patients to take medication, particularly medications that require an injection. The classic one is insulin, but there are many others.”

Injections can be painful, cause injuries and be a barrier to people taking medication, he added.

The shape of the capsule is inspired by the leopard tortoise, found in Africa, which has a steep, domed shell that allows it to right itself if it rolls onto its back. In the case of the capsule, the domed shape ensures that the needle is continually reoriented towards the stomach wall. The needle is attached to a compressed spring that is restrained by a disk made from sugar. When the capsule is swallowed, water in the stomach dissolves the disk, releasing the spring and injecting the needle into the stomach wall.

The stomach wall does not have pain receptors, so it is unlikely that this would cause any discomfort. The insulin needle takes about an hour to dissolve into the bloodstream. In tests in pigs, the researchers said they were able to deliver five milligrams of insulin – comparable to the amount that a patient with type 2 diabetes would need to inject.

The metal spring and rest of the capsule passed through the digestive system, without seeming to cause any problems.

The team are now carrying out further tests in pigs and dogs and hope to start the first human trials within three years.