Brandon Diallo is crazy about soccer, loves to play his Marvel Avengers game, and is thriving in kindergarten.

But if not for a brief test administered six years ago at Virtua Memorial Hospital in Mount Holly, his fate could have been dramatically different.

As required by a New Jersey law that had taken effect barely two months earlier, nurses measured the oxygen level in the boy's blood during the second night after his birth in November 2011.

The test, performed with an infant-sized version of the pulse oximetry device commonly used on adults, revealed abnormally low oxygen levels — suggesting that the boy suffered from a severe heart defect. Within minutes he was intubated and flown by helicopter to Children's Hospital of Philadelphia (CHOP), where he successfully underwent major surgery.

A new study finds that this quick "pulse ox" test — now required for newborns in nearly every state, including Pennsylvania — saves lives.

In New Jersey and seven other states that had implemented such a law by June 2013, the rate of infant deaths from critical heart defects declined by one-third when compared to states where laws had not yet taken effect, according to the study published in the Journal of the American Medical Association.

There is no telling for sure what would have happened to Brandon, who now lives in Washington state. But at the time, his physicians said that if not for early detection of his heart problem, he likely would have gone home from the hospital and suffered brain damage before anyone realized something was amiss.

His mother, Lorretta Diallo, agrees — in part because the family is African-American. If Brandon's low oxygen level resulted in any bluish tint in his dark brown skin, it went unnoticed. She now looks back at the boy's newborn photos and sees a purplish tint on his lips, but at the time she thought nothing was wrong.

"I thought he was normal," she said. "I would've gone home and it would have been bad."

Nurses were surprised when Brandon's first pulse oximetry test revealed an oxygen level of 40 percent saturation, as normal readings are in the 90s. So they did the test a second time, confirming that the baby needed fast action. At CHOP, he was stabilized in the cardiac catheterization lab, then a few days later he underwent surgery to repair a defect called transposition of the great arteries.

Previously, researchers estimated that nationwide oxygen screening of newborns would prevent 20 to 100 infant deaths from severe heart defects each year. The results of the new study suggest that the true impact might be even bigger, said the authors, from the U.S. Centers for Disease Control and Prevention (CDC) and William Paterson University in Wayne, N.J.

Before the laws took effect, 350 to 380 infants died each year from critical newborn heart defects. So if the one-third reduction in deaths holds true across the country, that would translate to about 120 lives saved annually, the authors wrote.

What's more, the analysis revealed an additional reduction in the rate of deaths caused by less severe heart defects, said co-author Scott D. Grosse, a research economist with the CDC's National Center on Birth Defects and Developmental Disabilities.

Grosse and Matthew E. Oster, a CDC physician researcher, said they planned to study further the impact that pulse ox screening may have on babies of color.

The rate of deaths from severe heart defects is significantly higher in African-American babies, compared with the general population. Likely there are numerous reasons for that disparity beyond the difficulty of detecting a bluish tint in brown skin, but nevertheless the infant oxygen test could help, Oster said.

"Can this screening program help level the playing field?" Oster asked.

Often severe heart defects can be detected before birth by a skilled ultrasound technician. But sometimes they are not, such as in the case of talk show host Jimmy Kimmel's son, whose heart defect was not diagnosed until after birth. So the newborn oxygen test is a final safety net.

In babies with the heart defect that Brandon was born with, the two large arteries that carry blood from the heart are switched around. As a result, the "blue" blood that is supposed to go to the lungs for oxygenation is instead delivered to the rest of the body, flowing around in a vicious, oxygen-deprived cycle.

The surgery that Brandon had at CHOP  detached the two arteries and reattached them in the proper places.

His mother said all indications are that the operation was a success. She said Brandon may one day need to have a stent implanted, but he has no restrictions on his activity.

"He's like a normal kid," she said, crediting both the surgeons and the middle-of-the-night oxygen test that revealed a problem no one saw coming.

"I would recommend it to anybody," she said.