Jack in the Box Inc. has agreed to buy Del Taco Restaurants Inc., marrying the offbeat chain with a fast-food competitor also popular with late-night diners. The burger chain’s shares slumped on the news. 

Jack in the Box will pay $12.51 a share in cash for Del Taco, a Mexican-inspired food brand concentrated largely in the southwestern U.S., representing a 66% premium over the closing price on Dec. 3. The total transaction is valued at $575 million, including existing debt, according to a statement.

The deal expands the reach of two chains toiling largely in the shadows of larger rivals such as McDonald’s Corp. and Yum! Brands Inc.’s Taco Bell. Jack in the Box, which has embraced an outsider image and offered quirky promotions including a cannabis-themed $4.20 meal, already offers cheap tacos on its menu.

“This is a natural combination of two like-minded, challenger brands with outstanding growth opportunities,” Darin Harris, Jack in the Box’s chief executive officer, said in the statement.

The deal is expected to close in the first quarter. Jack in the Box will finance the deal through the issuance of notes under an existing program. It has received a financing commitment provided by BofA Securities.

BofA Securities is serving as financial adviser to Jack in the Box and Gibson, Dunn & Crutcher LLP is serving as legal adviser. For Del Taco, Piper Sandler & Co. is serving as financial adviser and McDermott Will & Emery LLP is serving as legal adviser.