In the lawsuit, filed late on Thursday in New York state court, T-Mobile alleges that AT&T and Starbucks are not living up to an agreement the three companies reached over how Starbucks should transfer from its T-Mobile partnership to a new partnership with AT&T announced earlier this year.

T-Mobile is seeking unspecified damages against Starbucks for breach of its contract and unfair competition.

According to a transition agreement reached in February, T-Mobile was given the exclusive right to "sell, market and promote its services" in Starbucks stores until those stores were fully converted to the AT&T system, the lawsuit said.

Starbucks stores would be converted "on a market-to-market basis" and T-Mobile was to retain the exclusive right to market and sell its Internet services until a market had been fully converted, the lawsuit said.

"T-Mobile had made a very significant investment in the technology and equipment necessary to provide Wi-Fi service in the many thousands of Starbucks stores in the United States," the lawsuit said.

AT&T therefore benefited from the agreement prematurely and at the expense of T-Mobile, the lawsuit said.

"Starbucks and AT&T ... secretly developed a promotional plan under which they would offer 'free' AT&T/Starbucks Wi-Fi even in stores" that were still reliant on T-Mobile's infrastructure, the lawsuit said.

"Our goal is to ensure Wi-Fi access at all Starbucks locations. This is a benefit offered to our Starbucks Card Rewards members as well as AT&T subscribers and steps are being taken to ensure that this access continues," Starbucks spokeswoman Stacey Krum said.

According to the lawsuit, "To date, only two markets -- the San Antonio, Texas, and Bakersfield, California, markets -- have been transitioned from T-Mobile to AT&T."