LONDON — The London Stock Exchange Group and the Deutsche Börse said on Wednesday that they had agreed to merge in an all-stock deal that they hoped would create a European champion in a rapidly consolidating industry.

The transaction would unite two of the biggest European exchange operators and would create one better able to compete globally for stock listings, as a provider of clearing services and a purveyor of market data.

“The combined group will be well placed to adapt to industry and regulatory dynamics and able to compete globally,” Carsten Kengeter, the Deutsche Börse chief executive, said on Wednesday. “The combination enables Europe to maintain and enhance its capital markets infrastructure long term, invest in state-of-the-art infrastructure and build global connectivity.”

Yet there may be challenges ahead.

Intercontinental Exchange, the owner of the New York Stock Exchange, has said it is considering a rival offer for the London Stock Exchange. The CME Group — which operates the Chicago Mercantile Exchange, the Chicago Board of Trade and the New York Mercantile Exchange — and Hong Kong Exchanges and Clearing could also enter the fray.