When the Boston Marathon turned into a life-or-death situation for so many runners and spectators Monday, several who survived expressed immediate gratitude -- even those who lost limbs in the attack.

But how does the body survive without an arm or a leg?

The immediate trauma is physical: According to medical reports, two of Monday’s 10 or so amputees lost their limbs at the site of the bombings. The others underwent surgical amputation at the hospital.

PHOTOS: Five Major Advances in Prosthetics

Loss of blood is the main life-threatening concern, doctors said. Near the finish line, doctors and bystanders wrapped gauze tourniquets around legs.

"The major risk at that point is that you bleed to death," said Dr. Alberto Esquenazi, chairman of Einstein Healthcare Network's Department of Physical Medicine and Rehabilitation and chief medical officer for MossRehab Medical Center in Pennsylvania. "If there's nothing to hold the blood, you go into cardio shock, and as a result you die."

Most of the worst injuries seemed occur to the legs, because the bombs exploded close to the ground. How fast you bleed depends on where the limb was severed, said Dr. Terrence Sheehan, Chief Medical Officer at Adventist Rehabilitation Hospital of Maryland and medical director of the Amputee Coalition. The closer to the hip, the larger the blood vessels and the harder to stop the bleeding.

"That's why the first responders were very important," Sheehan said.

Time is also of the essence to save the limb, Sheehan said: Without blood flow, limbs can survive anywhere from one to six hours. Once in the operating room, surgeons are trained to salvage the limb and reattach it if at all possible, both doctors said.

PHOTOS: Mechanimals: Animals Fitted With Prosthetics

"That's the mindset of the surgeon, to save the limb: amputation is seen as failure," Sheehan said.

But on Monday, there wasn’t much question that many of the patients’ limbs could not be salvaged.

The operating rooms at Boston Medical had multiple surgeons to make team decisions, Dr. Tracey Dechert, a trauma surgeon at Boston Medical, told The New York Times.

"What we like to do is before we take off someone's leg -- it's extremely hard to make that decision -- is we often get two surgeons to agree," Dechert said.

Time is of the essence when it comes to surviving limb amputation. iStockPhoto

A team approach in the operating room is also important, Sheehan said, to ensure the future success of adapting to a prosthesis. Sheehan likes to have a vascular surgeon, an orthopedic surgeon, a plastic surgeon and sometimes a peripheral nerve specialist collaborating during surgery.

"What they do at that point is going to affect the person all the way down the line," he said. "The skin need to be closed in a certain way so we’re able to work with a person who will need to have a prosthesis. If someone has an exposed nerve or a bone not appropriate handled, they'll end up with problems with their prosthesis later."

NEWS: High Heels Inspire Better Prosthetics

After the risk of blood loss is over, the next level of risk is infection, Esquenazi said. The heat from the explosive device may have sterilized the pieces of metal that wedged into limbs, but infection is still possible.

Some patients whose limbs were damaged at the marathon but still intact may face future choices about amputations, Esquenazi said. Soldiers with similar blast injuries sometimes choose amputation over multiple surgeries, he said. Amputation can allow someone to start rehab faster and get back to their new normal life.

After surgery, it can take a while for the body to realize a limb is gone.

"In some instances I have had patients who would try to get out of bed when they awake in the middle of the night not realizing their leg is not there anymore," Equenazi said. "The body is resilient and has memory, but eventually it adjusts."