SAN DIEGO — People checked with a heart CT scan after seeing a doctor for chest pain have no less risk of heart attack, dying or being hospitalized months later than those who take a simple treadmill test, electrocardiogram or other older exam, a big federal study has found.

The results are a surprise: CT scans – fancy X-rays that give 3-D images of heart arteries – were expected to prove best and instead turned out to be just a reasonable alternative. Doctors have used these scans for a decade without knowing whether they are better than traditional tests. The federal government funded the $40 million study – the largest ever of heart imaging – to find out.

Chest pain can stem from something as serious as a clogged artery or as harmless as indigestion. CT scans are widely used to diagnose heart problems in emergency rooms. But their value isn’t known for people who go to a doctor with new but stable, less severe symptoms suggesting hidden heart disease.

The study, published online by the New England Journal of Medicine, involved more than 10,000 patients in the U.S. and Canada. Half were given CT scans. The rest got whatever other test their doctor chose to evaluate how well their heart was working, a sign of whether it is getting enough blood from heart arteries.

The aim of the study was to see which test led to the best diagnosis and treatment, thereby preventing the most deaths, heart attacks and hospitalizations for heart-related reasons over the next two years.

Only 3 percent of patients had one of these problems regardless of what kind of test they got. It suggests that many of them may not have needed extensive testing at all, just medicines to address risk factors such as high blood pressure or cholesterol if their treadmill test was OK.

The study also wound up exposing how much medical radiation most CT scan patients are getting – equivalent to 500 to 700 regular X-rays, and more for an echocardiogram. Radiation can raise the risk of developing cancer, yet few doctors are choosing heart tests that do not require radiation, the study revealed.