More investment in math and science education and a more liberal policy toward skilled foreign workers are crucial if America is to avoid losing its competitive edge in the world, Microsoft co-founder Bill Gates told Congress Wednesday.

The shortage of scientists and engineers is so acute that "we must do both: reform our education system and our immigration policies. If we don't American companies simply will not have the talent to innovate and compete," Gates said in testimony to the House Science Committee.

Gates got a good reception from the committee, which was holding the hearing to mark the 50th anniversary of the panel's founding following the Soviet Union's launch of the Sputnik satellite in 1957. "We are on the cusp of another Sputnik moment," said committee chairman Rep. Bart Gordon, D-Tenn. "I fear that our country has coasted on the investment made in the last 50 years."

Gates outlined four goals he said the country must pursue: improving educational opportunities in science and technology, revamping the visa system for highly skilled workers, increasing federal funding for basic scientific research and providing incentives for private-sector research and development.

The toughest sell was the position of Gates, and others in high tech industries, that Congress raise the current cap of 65,000 H-1B visas, nonimmigrant visas that allow employers to hire foreign nationals with specific skills. The program also allows another 20,000 visas for foreign nationals receiving masters or doctoral degrees from U.S. universities.

Current limits, he said have led to a "serious disruption" in the flow of talented science, technology, engineering and math graduates to U.S. companies. Gates said Microsoft and other firms have been forced to locate staff in countries more open to skilled foreign workers . Last year, Microsoft was unable to obtain H-1B visas for one-third of the qualified foreign-born job candidates it wanted to hire.

Lawmakers have introduced bills to expand the program. But pro-immigration legislation is making little headway in this election year, and the H-1B program has been criticized by some for taking away American jobs, lowering wages or being abused by foreign companies in the United States to bring in foreign workers.

"Despite continued fraud and abuse in the H-1B program, I have yet to see one thing from the administration to address the problem," Sen. Charles Grassley, R-Iowa, wrote this week to Homeland Security Secretary Michael Chertoff.

"Our goal is not to replace the job of the B students with the A student from India," Rep. Dana Rohrabacher, R-Calif., told Gates.

Gates replied that the demand for skilled employees ensures that wages will not be depressed and said that Microsoft adds an average of four employees to support each H-1B hire.

He said 59 percent of doctoral degrees in the sciences and engineering now go to temporary residents. "It makes no sense to educate people in our universities ... and then insist that they return home."

Congress, he said, should do away with per-country visa limits and significantly increase the number of permanent residency green cards available every year.

Gates, whose Bill & Melinda Gates Foundation has donated billions to educational programs, backed investment to raise educational standards and attract more talented people into math and science teaching.

He urged Congress to reinstitute the R&D tax credit that expired last year.