The investment firm that controls the Krispy Kreme chain and coffee brands Keurig, Peet's and Caribou reached an agreement to acquire Panera Bread and turn it into a private company.

JAB is expanding its empire of coffee-related brands with the acquisition of publicly traded Panera in a deal worth more than $7 billion.

Panera's ascension as one of the most successful fast-casual chains shook up the restaurant industry.

JAB gave few details about its plans for Panera, which has more than 2,000 locations and about $5 billion in annual sales.

But the company said that it would maintain the current executive leadership, which includes CEO and founder Ron Shaich.

"We strongly support Panera's vision for the future, strategic initiatives, culture of innovation, and balanced company versus franchise store mix," JAB partner and CEO Olivier Goudet said in a statement. "We are excited to invest in and work together with the company's management team and franchisees to continue to lead the industry."

JAB will pay $315 per share and assume $340 million in debt.  Panera shares jumped 12.9% in pre-market trading to $309.42.

UBS analyst Dennis Geiger said Tuesday in a note to investors that "the rationale for a potential sale at this time is understandable," given Panera's streak of financial success, trendy menu, quality products and leadership.

The company has also stayed ahead of the technological curve by introducing digital ordering earlier than many competitors.

Geiger said an acquirer might seek to expand Panera brand products available for sale at retail. The company currently sells an estimated $150 million in retail products annually, according to UBS, representing only a sliver of its business.

Shaich hailed the deal as the "best way to continue to operate with" the company's growth strategy. He agreed to vote his shares in favor of deal, representing a share of about 15.5%.

"We are pleased to join with JAB, a private investor with an equally long-term perspective, as well as a deep commitment to our strategic plan."

The companies expect the deal to close in the third quarter.

JAB said that a fund called JAB BV, part of JAB Consumer Fund and JAB Holding Co., will officially acquire Panera.