ZF Friedrichshafen AG of Germany agreed to acquire U.S. rival TRW Automotive Holdings Corp. for about $11.7 billion to create the world's second-largest automotive supplier by sales as car parts makers look to build scale amid technological shifts in the global auto industry.

The merger, announced Monday, establishes an automotive parts supplier with potential annual revenue of about $41 billion, ranked No. 2 after Germany's Robert Bosch GmbH and ahead of Japan's Denso Corp. The combined group will be a new industry powerhouse,...