SANTA BARBARA, Calif. — In 2013, Sonos scored a coup when Google agreed to design its music service to work easily with Sonos’s home speakers. For the project, Sonos handed over the effective blueprints to its speakers.

It felt like a harmless move, Sonos executives said. Google was an internet company and didn’t make speakers.

The executives now say they were naïve.

On Tuesday, Sonos sued Google in two federal court systems, seeking financial damages and a ban on the sale of Google’s speakers, smartphones and laptops in the United States. Sonos accused Google of infringing on five of its patents, including technology that lets wireless speakers connect and synchronize with one another.

Sonos’s complaints go beyond patents and Google. Its legal action is the culmination of years of growing dependence on both Google and Amazon, which then used their leverage to squeeze the smaller company, Sonos executives said.