The City University of New York, no stranger to campus skirmishes, has now taken a stance in the cola wars: “no Coke, Pepsi.”

Amid a campaign to persuade university administrators to ban Coca-Cola products, CUNY has given Coke’s main rival, Pepsi-Cola, the exclusive right to distribute nonalcoholic beverages on all 24 of its campuses.

The contract, CUNY’s first systemwide deal with a beverage company, calls for Pepsi to pay about $21 million over 10 years, said Michael Arena, a spokesman for the university.

Almost all of that money will be shared with each of the schools, based on consumption on its campus, Mr. Arena said. But about $300,000 will go toward athletic events, and an additional $200,000 toward sustainability initiatives, he said.