Sonos CEO Patrick Spence told CNBC on Thursday that the speaker maker's decision to sue Google over patent infringement was born of necessity.

"I'm not going to sit idly by because there's real value" in our patented technology, Spence said on "Squawk Alley."

"That's not the way it should work in America for a small innovative company. At the end of the day, we went out. We did the work," he said. "I owe it to everybody at Sonos to stand up for our innovation and protect what we invented."

Spence's comments come as shares of Sonos soared about 13% following a stronger-than-expected earnings report. The stock also hit a 52-week high of $16.88 on Thursday as investors reacted to the success of Sonos' new product offerings during the holiday season.

Sonos sued Google in early January for patent infringement, arguing the search engine giant used technology developed by Sonos that allows smart speakers to wirelessly play music across different rooms.

In particular, the lawsuit claims Google obtained knowledge of Sonos technology in 2013, when the two companies collaborated to bring Google's streaming music service to Sonos speakers.

"However, just two years later in 2015, Google began willfully infringing Sonos's patents when it launched its first wireless multi-room audio product, Chromecast Audio," claims the lawsuit, which was filed in Los Angeles.

In a statement in January, Google disputed the allegations, saying that "over the years, we have had numerous ongoing conversations with Sonos about both companies' IP rights and we are disappointed that Sonos brought these lawsuits instead of continuing negotiations in good faith."

Google also responded to Spence's remarks Thursday in a statement to CNBC, arguing Sonos "has made misleading statements about our history of working together. Our technology and devices were designed independently."

Spence, who became Sonos CEO in 2017, said the company will continue to defend its products, pointing to their 2014 patent infringement lawsuit against Denon. The two companies settled in 2018.

The Sonos chief said he wasn't concerned about how a long-running lawsuit might impact the company's balance sheet or any of its existing partnerships with Google and other players.

"We're strong financially. We're innovating and executing very, very well," said Spence. "But I'm not going to sit back and let people take what we invented and just copy it. That's why we've invested in patents."