Vitamin D might help people with heart disease avoid a heart attack, if it's provided in a dose tailored to you by a doctor, a new study says.

Folks provided vitamin D reduced their risk by more than half, researchers reported Sunday at the American Heart Association's annual meeting in New Orleans.

But there's a catch -- people weren't downing supplements on their own, but taking custom doses designed to optimize the vitamin D levels in their blood, researchers said.

"We encourage people with heart disease to discuss vitamin D blood testing and targeted dosing with their health care professionals to meet their individual needs," lead researcher Heidi May, an epidemiologist at Intermountain Health in Salt Lake City, said in a news release.

Related