NEW YORK - Just because you're in the hospital doesn't mean you'll quickly get treated if your heart stops beating. About one-third of patients don't get a potentially live-saving shock within the recommended two minutes, a new study found.

Those who don't get prompt defibrillation are more likely to die or end up brain damaged or disabled, the study showed. For every minute of delay, the chances of survival worsens, researchers reported in Thursday's New England Journal of Medicine.

"It is probably fair to say that most patients assume unfortunately, incorrectly that a hospital would be the best place to survive a cardiac arrest," Dr. Leslie A. Saxon, a cardiologist at the University of Southern California, wrote in an editorial in the journal.

Recent attention has focused on getting quicker treatment for heart attacks that occur outside hospitals, and adding defibrillators to public places like airports and schools. The researchers instead looked at what happens inside hospitals and how response time affects survival.

Their study found that 39 percent of those quickly treated survived to leave the hospital, compared with only 22 percent of those whose treatment was delayed past the two-minute guideline.

"We still have a lot to learn as to how to deliver treatment in an effective way," said lead author, Dr. Paul S. Chan of St. Luke's Mid America Heart Institute in Kansas City, Mo.

The study used data from a national registry of 369 hospitals that track response times and outcomes. It included 6,789 cases of cardiac arrest caused by an abnormal heart rhythm, the kind most responsive to getting shocked back to a normal heartbeat. Only cases that occurred in intensive-care units or regular units were included, not those in the emergency room or during surgery.

More than half of the patients got a jolt from a defibrillator in one minute or less, but it took more than two minutes sometimes more than 6 minutes for about 30 percent to get zapped.

The research showed delays were more likely at smaller hospitals, after-hours or on weekends, and for patients who weren't constantly being monitored or were admitted for non-heart problems.

Delays were also more common for black patients, which couldn't be explained by the information used for the study, Chan said. He said the difference may be more a reflection of the quality of the hospitals than discrimination.

One potential way to speed up response times, Chan suggests, is to make automated external defibrillators, or AEDs, available throughout hospitals so that nurses could readily use them instead of waiting for doctors to deliver shocks.

"We have them outside the hospital setting already today. Is there any reason not to have these (in hospitals)?" Chan said.

Saxon, the editorial writer, also advocates more AEDs in hospitals, and using wireless technology that allows for more patients around the hospital to have heart monitors.

"We've made great strides in public-access defibrillation and implantable devices. Let's bring this to our hospitalized patients," she said.