LONDON — The insurance broker and risk management advisory firm Willis Group Holdings said on Tuesday that it had agreed to an all-share merger with the professional services firm Towers Watson that would create a company with an $18 billion market value.

The deal would create a professional services, risk management and insurance brokerage firm with more than $8 billion in annual revenue and about 39,000 employees in more than 120 countries, the companies said.

The combined company would operate under the Willis Towers Watson brand. The transaction is subject to approval by regulators and by the shareholders of both companies. It is expected to close by the end of the year.

“This is a tremendous combination of two highly compatible companies with complementary strategic priorities, product and service offerings, and geographies that we expect to deliver significant value for both sets of shareholders,” John Haley, the chairman and chief executive of Towers Watson, said in a news release. “We see numerous opportunities to enhance our growth profile.”