On second thought ...

Twitter Inc. has invested about $70 million in SoundCloud two years after the troubled Silicon Valley microblogging service considered buying the Berlin-based online audio-sharing platform.

The investment is part of a SoundCloud fundraising round of about $100 million, in which the company founded in Stockholm eight years ago is valued at about $700 million, people familiar with the deal told the technology website Recode.

“Earlier this year we made an investment in SoundCloud through Twitter Ventures to help support some of our efforts with creators,” Twitter co-founder and CEO Jack Dorsey said.

Twitter shares rose nearly 5.6 percent to $15.36 on Tuesday, outpacing the broader Standard & Poor's 500 and tech sector stocks. Twitter’s shares are down nearly 34 percent for the year.

Ten-year-old Twitter, which went public in November 2013, has been struggling to grow subscribers and to offer new features to lure new users. The deal suggests Twitter may seek to integrate subscribers’ ability to easily share audio files, which could provide a useful platform distributing sound files through the microblogging site.

SoundCloud, which is often called the “YouTube for audio” recently rolled out its subscription-based service SoundCloud Go, which has a much larger audio library than other audio-streaming services, and one that gives publishers more freedom to pick which tracks are free and which go behind the paywall.

SoundCloud doesn’t consider itself purely a music-streaming service and has focused on marketing itself as a platform for audio creators to easily publish their works online. A partnership with Twitter could give producers a larger audience.

Twitter is trying to improve its platform to attract new users and retain old ones. It’s currently tweaking its simple 140-character message format to make it easier for users to express themselves with multimedia content.