The House yesterday approved a health and education spending bill for 2006 that cuts deeply into scores of programs and bars Medicare and Medicaid from covering impotence drugs.

The $602 billion bill, approved 250 to 151, is slightly more than President Bush proposed but less than many lawmakers had wanted. Republicans and Democrats took up two days of floor time trying to win extra money for popular programs that fall under the $142.5 billion portion of the bill that Congress controls, the balance going to mandatory programs such as Medicaid.

Only a few of those efforts were successful, including a bid Thursday to restore $100 million to public broadcasting.

The ban on coverage of impotence drugs, approved 285 to 121, is part of a larger debate on whether Medicare and Medicaid should cover "lifestyle drugs." Rep. Steve King (R-Iowa), who offered the amendment, cited Congressional Budget Office estimates that impotence drugs could cost the federal government at least $2 billion between 2006 and 2015, at a time when health care costs are spiraling and Congress is trying to chip away at the deficit.

"Medicare and Medicaid were established to provide lifesaving medication for the truly needy," King said.

Earlier, the Appropriations Committee added a provision to ban coverage of impotence drugs for convicted sex offenders. Recent studies have shown that hundreds of sex offenders in numerous states had obtained such drugs under the Medicaid program.

Opponents of the amendment, including Rep. Nancy L. Johnson (R-Conn.), who chairs the Medicare subcommittee on the Ways and Means panel, argued that men who lost sexual function because of prostate cancer or other diseases have a legitimate claim to medications such as Viagra and Cialis.

The spending bill funds federal education programs, including Pell Grants, special-education grants, teacher training, Head Start and basic skill assessments. It also pays for a vast array of medical research and health care programs, including Medicaid, the Centers for Disease Control and Prevention, the Ryan White AIDS program, and numerous public health initiatives, including bioterrorism preparation.

The bill provides funding to implement the new Medicare prescription drug program and for two big priorities of the conservative movement: religion-based community outreach and abstinence education.

But a tight budget squeeze forced the termination of 57 programs and froze or reduced funding to many others.

Democrats sought to depict the bill as the outgrowth of misplaced Republican priorities. Citing the billions in tax cuts that Congress has enacted under the Bush presidency, many of them targeting the wealthy, Rep. Robert Menendez (D-N.J.) said, "It is inexcusable, and I find it immoral, that the first thing that goes is our investment in our children's future."

Menendez singled out education cuts, a rich target given that one of Bush's proudest achievements is No Child Left Behind Act, a package of education revisions passed in his first term. Menendez noted that the appropriations bill cuts funding for initiatives created under No Child Left Behind by more than $800 million from last year, to a level far less than Bush had requested for fiscal 2006.

Noting that 1.7 million fewer disadvantaged children will receive after-school care under the bill, and that it provides only half of the increased promise for the maximum Pell Grant, Rep. David R. Obey (Wis.), ranking Democrat on the Appropriations Committee, said, "This bill just does not measure up to our national obligations."

The frustration was bipartisan. Many Republicans offered amendments or spoke out against certain cuts. Rep. Mark S. Kirk (R-Ill.) complained that the only federal program for disadvantaged gifted students was slotted for elimination. He noted that the program reached 2 million children nationwide for about $11 million per year.

"We must continue to provide support for our brightest children to succeed," responded Rep. Ralph Regula (R-Ohio), who chairs the Appropriations subcommittee that wrote the bill. But "with such a tough budget allocation, some important and successful programs" had to go by the wayside, he lamented.