His pledge came after the House voted 231-193 to approve a $726 billion defense spending plan that would retain $485 million for the second engine program.
In a statement Friday, Obama said he joined Defense Secretary Robert Gates in opposition to the alternate engine, made by General Electric-Rolls Royce, and to the purchase of more Boeing Co. C-17 cargo planes. (The C-17s are not in defense spending plans approved by the House or the Senate Armed Services Committee.)
"Our military does not want or need these programs being pushed by the Congress, and should Congress ignore this fact, I will veto any such legislation so that it can be returned to me without those provisions," Obama said.
The Office of Management and Budget also included a veto threat in a statement of administration policy issued Thursday, The Hill reported.
Supporters of the second engine say it's necessary for the F-35 program and argue a backup engine would be useful if there's a problem with the primary engine. They also say competition between GE-Rolls Royce and Pratt and Whitney, maker of the primary engine, could save money over the life of the program, the Washington publication reported.
The GE-Rolls Royce Engine has already cost the Defense Department about $2 billion and the White House predicts it will cost $2.4 million more.
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'