﻿ Mondelez International Inc. made a roughly $23 billion bid for Hershey Co. in an effort to create the world’s largest candy maker at a time when both companies’ sales are under pressure.

Mondelez, which makes Oreo cookies and Cadbury chocolate bars, recently sent a letter to Hershey proposing a tie-up at $107 a share, half in cash and half in stock. Hershey’s board unanimously rejected the bid Thursday and said it “provided no basis for further discussion.”

Still, Hershey shares surged 17% to $113.49 on news of the offer—first reported by The Wall Street Journal—remaining elevated even after the company rejected the bid, in an indication investors believe Mondelez won’t be discouraged. Mondelez shares gained 6% to $45.51, giving the snack giant a market value of more than $70 billion.

A takeover of Hershey, known for its namesake Kisses and chocolate bars, would face obstacles. Any deal would require the approval of the Hershey Trust, which holds 8.4% of its common stock and 81% of its voting power and has opposed a sale in the past.

A spokesman for the trust, whose board includes three Hershey directors, declined to comment.