WASHINGTON - President Barack Obama, seeking to end the schedule delays and cost overruns that plague U.S. defense spending, signed a law on Friday to reform the way the Pentagon purchases major weapons systems.

As commander-in-chief, I will do whatever it takes to protect the American people, Obama said at a White House signing ceremony. But I reject the notion that we have to waste billions of dollars to keep this nation secure.

The Senate and the House of Representatives passed the legislation unanimously earlier in the week. House Armed Services Committee Chairman Ike Skelton said the measure won broad support because weapons program cost overruns and schedule delays were rampant.

Citing a government report that detailed $295 billion in waste and cost overruns in defense contracts, Obama said, It's finally time to end this waste and inefficiency.

The Government Accountability Office estimated nearly 70 percent of the Pentagon's 96 biggest weapons programs were over budget in 2008.

The legislation would create a Pentagon office responsible for estimating the cost of new programs and led by a director who reports to the defense secretary.

It would also put a bigger focus on testing new weapons before they enter production to ensure technologies were sufficiently developed, and would give military commanders a bigger say in framing requirements for any new weapons.

The changes are being closely watched by the Pentagon's biggest defense contractors -- Lockheed Martin Corp, Boeing Co, Northrop Grumman Corp, General Dynamics Corp and Britain's BAE Systems Plc.