Ford's Bridgend plant will build the company's new generation of petrol engines in a deal worth £181m.
The investment is backed by nearly £15m from the Welsh government with production due to start in late 2018.
Economy Minister Edwina Hart said the deal would “safeguard more than 750 skilled Welsh jobs for many years”.
“In a climate of stiff global competitiveness, we have been actively seeking to win a share of this investment for Wales,” she said.
“Ford's decision to manufacture its new innovative engine here in Wales is a tribute to the reputation of the local management team and the quality and loyalty of the Welsh workforce,” she added.
The Ford Bridgend plant opened in 1980 and has fought fierce competition to win successive investments in the past worth more than £2.8bn.