For decades, the war on cancer has been waged with the medical equivalent of buckshot: Toxic drugs are injected into patients and then scatter, with only a small fraction landing on the intended target. Tumors may shrink, but patients often suffer horribly.

Now, inside laboratories in Massachusetts and around the world, scientists are developing cancer weapons that are made tiny enough to pierce cancerous cells and smart enough to spare healthy ones.

The devices, often made of common materials like plastic or rust, hold the promise of delivering payloads of powerful medication directly to tumors. Other diminutive devices would act like glowing beacons, quickly indicating when cancer has spread or returned.

The federal government is investing nearly $145 million in the quest, with $20 million of that devoted to research at the Massachusetts Institute of Technology and Harvard University. And the pace of discovery is accelerating: Already, one cancer-detection method developed at Massachusetts General Hospital is awaiting approval by federal regulators.

Still, the research must solve a host of medical and engineering riddles demanding the expertise of cancer doctors, as well as chemists, electrical engineers, and computer scientists.

"We're dreaming about how cancer [treatment] can be changed," said Dr. Sangeeta Bhatia, a physician and engineer at MIT. "But it has to be borne out in patients - that's the ultimate challenge."

This is a field in which size matters. The smaller, the better. Just how small? Think of a tennis ball. Now, think of something tens of millions of times smaller. That is the size of some of the tumor-detecting and drug-delivering vehicles being developed.

The devices are known as nanoparticles, and at their smallest, they are single crystals of a material. A favorite choice among scientists is iron oxide, better known as rust. Even if hundreds of the particles are suspended in liquid in a test tube, they are barely visible.

But their potential is huge.

Doctors have long been frustrated by their inability to know before they operate whether cancer has colonized surrounding lymph nodes. If cancer has traveled from a man's prostate to the adjacent tissue, for example, a doctor might very well opt for radiation rather than surgery.

"The goal of the surgery is cure," said Dr. Mukesh Harisinghani, a Massachusetts General Hospital radiologist. "But if I expose the patient to the [risk] of the surgery and he still has disease present elsewhere, I'm not curing him."

So the Mass. General scientists enlisted iron oxide nanoparticles to go hunting for cancer-riddled lymph nodes.

The nanoparticles are pumped into patients. If there's no cancer present, the slivers of iron are absorbed into the lymph nodes, which appear black on an MRI scan, signaling health. By contrast, if cancer has colonized the lymph nodes, the MRI will turn white, because malignant cells can't consume the iron nanoparticles.