Krispy Kreme Doughnut Corp. says it has bought a majority stake in Insomnia Cookies, the University City-based "leading cookie delivery company in the United States."

The companies wouldn't say what the Winston-Salem, N.C.-based Krispy Kreme paid. CNBC reported the sides had agreed on a price of under $500 million for the cookie chain, which has 135 stores, many in college towns and yuppie neighborhoods where young people studying or partying want to indulge in fatty warm snacks.

"We are delighted to add Insomnia Cookies," said Krispy Kreme chief executive Mike Tattersfield in a statement. He said the companies would operate independently.

Reached by email, Insomnia founder Seth Berkowitz called the sale "a dream come true." Berkowitz started the business in 2003 when he was a student at the University of Pennsylvania. He said he has in the last 15 years built Insomnia into "a mainstay in college campuses."

The chain has expanded beyond area schools including Penn, Temple University, and University of Delaware into one or more college neighborhoods in most of the continental United States, and added stores in nearby office and residential neighborhoods, where young professionals whose resident advisers brought cookies into final-exam dorm study sessions are now ordering bags of Insomnia cookies for software and accounting team breaks.

Berkowitz also said the companies are "exploring opportunities" to expand sales. For example, "we are launching La Colombe canned draft latte in our Philadelphia stores next week."

The companies said Berkowitz will stay in charge of Insomnia after the scheduled close of the sale later this year. (Acquirers typically say they are going to keep founders around in their deal announcements, though many leave after a deal is concluded. A Krispy Kreme spokesperson declined to talk about how Insomnia fits into the company's strategy beyond what's in the news release.)

Krispy Kreme, founded in 1937, has 1,400 retail shops in the U.S. and more than 30 other countries in Europe, Asia, Latin America, Africa, and the South Pacific. Krispy Kreme doughnuts are also sold by grocery chains and convenience stores.