Buffalo Wild Wings, the Minnesota-grown beer and wings chain that drew hungry sports fans and delighted investors for years, is being sold in $2.9 billion deal to the owner of Arby’s and other fast food chains.

The deal, announced Tuesday, comes after three years of slower growth and greater profit pressures at the Golden Valley-based company, which had been one of the fastest growing restaurant chains in the United States from 2003 to 2014.

It happened less than six months after an activist investor won strategic control of Buffalo Wild Wings by touting a plan to double or triple its value in the next four years. Instead, the company’s stock plunged this summer and fall.

Roark Capital Group, an Atlanta investment firm that owns many sizable fast food chains, agreed to pay $157 a share for Buffalo Wild Wings, or about $2.4 billion. That is about where the stock was before activist Mick McGuire gained control.

Roark will also assume all of the company’s debt, amounting to around $500 million. Roark will run the approximately 1,200-unit chain as an independent subsidiary of Arby’s Restaurants Inc., which it has owned since 2011.

Executives at Buffalo Wild Wings and Arby’s issued statements that said the deal was beneficial to both firms.

“I am confident this merger will be instrumental in guiding the Buffalo Wild Wings brand toward a new chapter of growth and success,” longtime Wild Wings CEO Sally Smith said in an e-mail to company employees.

Smith announced her retirement on the day McGuire won strategic control but has remained on the job while the company’s board looked for a successor. Through a spokeswoman, she declined an interview request.

When the company late last month reported its July-to-September results, she told investment analysts that she expected it to be her last conference call with them. The board was interviewing candidates to succeed her and she expected there to be an announcement by the end of the year, Smith said at the time.

Several analysts earlier this month noted that the search for Smith’s successor was taking longer than expected. Chris O’Cull, analyst at Stifel, suggested in a research note that the company’s board was “struggling to define a clear vision for improving shareholder value.”

With the sale, Arby’s CEO Paul Brown will oversee Buffalo Wild Wings. He is likely to appoint someone else to be a subsidiary-level chief executive. The company issued bonuses and incentives to retain several top executives at Buffalo Wild Wings, including CFO Alexander Ware, through a transition period.

McGuire, the activist investor who in the summer of 2016 launched what would become a proxy battle with Buffalo Wild Wings management, also declined to comment through a spokeswoman.

It wasn’t immediately clear whether McGuire and his firm, Marcato Capital of San Francisco, made money on the abortive attempt to remake Buffalo Wild Wings. The price of the company’s shares ranged from about $140 to $175 during the time McGuire built up his stake and campaigned against management. On June 2, the day McGuire won the proxy fight, Buffalo Wild Wings shares closed at $152.35.

Shareholders next

The boards of the two companies have approved the deal, but it is subject to a shareholder vote.

If another potential buyer emerges, Buffalo Wild Wings would have to pay Arby’s $74 million to terminate the deal. If Arby’s fails to conclude the deal, it would have to pay Buffalo Wild Wings $134 million.

Roark is providing Arby’s with $783 million and Arby’s is borrowing $2.2 billion to pay for the deal. Arby’s, founded in 1964, is the second-largest sandwich restaurant brand in the world with more than 3,300 restaurants in seven countries.

Roark Capital has over the past decade purchased some of the nation’s largest and best-known restaurant chains. Its portfolio includes controlling stakes in Arby’s, Auntie Anne’s, Carl’s Jr., Cinnabon, Hardees, Jimmy John’s, Naf Naf Grill, Schlotzsky’s and Wingstop. It owns a minority stake in Wisconsin-based Culver’s.

Buffalo Wild Wings grew out of a wings restaurant that opened near the Ohio State University campus in Columbus in 1982.

Within a few years, it added several locations around Ohio and the Midwest and Ken Dahlberg, the Twin Cities businessman who created the Miracle-Ear hearing aid, became its principal investor and owner. In 1991, he started to franchise the concept.

Three years later, after Buffalo Wild Wings had grown to about 30 locations, Dahlberg hired Smith as chief financial officer to bring some order to its chaotic finances and a messy tax situation.

In 1996, he made her the company’s chief executive.

When Buffalo Wild Wings in 2003 filed to sell shares to the public, it had 217 locations in 27 states, 77 that it owned directly and the rest owned and operated by franchisees.

As a publicly traded company, Buffalo Wild Wings shares gained 15 times their value until the firm’s growth started to level off around 2014.

The company’s restaurants took advantage of the rise of high-definition TVs, multiple sources of sports programs and the craft beer craze to create a high-energy destination for families and sports fans.