Elementary school children have made gains in science, based on the first national test in five years, but students in middle and high school have not escaped their rut.

The lackluster performance by older children underscores the deep concern among political and business leaders who see eroding science achievement as a threat to the U.S. economy.

A more hopeful sign is that young children are getting better at earth, physical and life sciences, according to test scores released Wednesday. That improvement comes even as their schools tend to focus on math and reading, subjects targeted by federal education law.

The 2005 science scores are from the National Assessment of Educational Progress, a federal test given periodically in a range of topics. It is considered the best measure of how students perform over time and of how one state stacks up against another.

In a step forward on a national priority, black and Hispanic students narrowed their achievement gap with white students in fourth grade. But that good news was limited.

Racial gaps did not shrink in eighth grade, and the gap between blacks and whites even widened in 12th grade.

Overall science scores mirrored a recent pattern in other subjects: Elementary school kids improve, middle school students do not and high school students also stagnate or slip.

"It's perplexing," said Darvin Winick, chairman of the independent National Assessment Governing Board, which oversees the test. "Almost everybody is on the high school reform bandwagon now, and all this report should do is fuel that fire a little more."

The 12th-grade scores have not changed since the science test was last given in 2000. But they have dropped over a longer, 10-year testing period, the only grade to see that slip.

Students were challenged to understand the principles of science, use their skills to investigate and apply science knowledge to solve everyday problems. Topics ranged from concepts of air and space to energy and motion to the functions of living organisms.

The goal is for all students to show they can handle challenging subject matter, a skill level known as proficient. In grades four and eight, fewer than one in three students — 29 percent — achieved at that level or better. Only 18 percent of 12th graders did that well.

The younger students, at least, are moving in the right direction.

Fourth-graders posted a better overall test score in science compared with 2000. The lowest-performing students made the gains, lifting the overall score. Yet even in fourth grade, the percentage of students who could handle challenging work did not improve.

Most states did not improve in science in grade four or eight. Federal officials did not test large enough samples of students to offer representative state data for grade 12.

The states posting the highest number of children who could handle challenging science material include Massachusetts, Montana, New Hampshire, North Dakota, Vermont and Virginia.

Among states with the lowest percentages of children doing proficient work are Alabama, Arizona, California, Hawaii, Louisiana, New Mexico, Nevada and Mississippi.

The federal science test is voluntary for states, and six did not take part: Alaska, Iowa, Kansas, Nebraska, New York and Pennsylvania, along with the District of Columbia.

Boys outperformed girls in every grade tested.

Improving science has surged to the top of the education agenda for President Bush and Congress as corporate leaders, universities and scientific groups have pleaded for action. Science skills strongly influence how well workers can handle a huge range of today's jobs.

A National Academies panel has warned the U.S. faces such a crisis in math and science that today's children could have poorer prospects than their parents or grandparents.

Under the federal No Child Left Behind law, schools are graded — and face consequences for failure — only in math and reading, not science. Bush has proposed changing that.

The National Center for Education Statistics, an arm of the Education Department, administers the test. A national sample of more than 300,000 students took the test in 2005.