CNN  — 

Jay-Z has 99 problems but figuring out a buyer for his struggling music streaming service is no longer one.

Square (SQ), the payments company founded and run by Twitter CEO Jack Dorsey, announced Thursday it has agreed to acquire a majority stake in Jay-Z’s Tidal platform.

In a press release, Square said it expects to pay $297 million in cash and stock for the stake. As part of the deal, Jay-Z will join Square’s board.

The long-rumored deal offers an exit for Tidal, which has struggled to compete with larger rivals like Spotify. It also further expands Square’s portfolio of services. The company has gone from offering mobile payments to providing a full suite of tools for small businesses, including an in-house bank launched earlier this week to provide business loans and deposit products to sellers who use its card reader and other point-of-sale services.

Beyond that, it builds on the relationship between Dorsey and Jay-Z. The pair recently partnered on a bitcoin development fund and have been photographed together on vacation. In a statement Thursday, Jay-Z said: “Jack and I have had many discussions about Tidal’s endless possibilities that have made me even more inspired about its future.”

Nonetheless, it’s a puzzling deal for a company known for its financial products. Dorsey addressed the issue in a series of tweets on Thursday, “Why would a music streaming company and a financial services company join forces?!” The answer, he said, “comes down to a simple idea: finding new ways for artists to support their work.”

“Given what Square has been able to do for sellers of all sizes and individuals through Cash App, we believe we can now work for artists to see the same success for them, and us,” he added. “We’re going to start small and focus on the most critical needs of artists and growing their fanbases.”

Moshe Katri, an analyst at Wedbush, said the deal is part of Square’s “ongoing strategy of building eco-systems around merchants/sellers and consumers.” In buying Tidal, Katri said Square can expand its user base to include artists, musicians and fans.

Investors appeared less certain of the benefits. Shares of Square were down nearly 7% in early trading Thursday following the announcement.

Tidal was launched in 2014 and purchased a year later by a consortium of artists, including Jay-Z, for $56 million. The move came as an alternative to other streaming services, such as Spotify, following arguments over artist compensation. But the service never seemed to catch on in the same way.

“Square created ecosystems of tools for sellers & individuals, and we’ll do the same for artists,” Dorsey said. “We’ll work on entirely new listening experiences to bring fans closer together, simple integrations for merch sales, modern collaboration tools, and new complementary revenue streams.”