Apple Inc is close to launching an online music storage and streaming service after reaching deals with three of the four major labels and is expected to wrap up the fourth in a few days, according to several people familiar the plans.

The iPhone and iPad maker completed work on the new service a while back, according to two people, and will beat Google Inc and Amazon.com Inc in the bid to launch a comprehensive 'cloud' music service. The iTunes cloud-based service will offer users the ability to buy, store and stream favorite songs and albums wherever they have an Internet connection on any device.

Warner Music Group Corp was the first to reach a cloud deal with Apple more than two weeks ago and was followed by EMI Group and Sony Corp's Sony Music Entertainment more recently, according to three people with knowledge of the talks. Vivendi SA's Universal Music Group, the largest music company in the world, is within days of putting pen to paper on the new cloud service, said a fourth person.

Spokespeople for Apple and the labels all declined to comment.

The big technology companies are vying to be leaders in new ways for fans to access songs and videos. As the sales of physical media such CDs and DVDs fall rapidly, the tech giants are betting they can sell media subscriptions, software and innovative devices linked to these services.

While Amazon is the leading e-reader maker, Apple and Google are competing on mobile platforms for smartphones and tablet devices.

Apple has discussed plans for a cloud-based iTunes service on and off over the last year with the labels. It stepped up negotiations recently, according to these people. It is now expected that Apple will likely be in a position to announce its cloud music plans in time for the Apple Worldwide Developers Conference on June 6.

Steve Jobs, Apple's founder, has in the past unveiled products, including the iPhone 4, at the WWDC.

There is a chance the new music service could be ready to launch by June 6, but it would also need deals with song publishers. Apple has opened talks with some publishers, according to two people.

Amazon and Google launched music locker services in the past few weeks without new licensing agreements, leading to threats of legal action from some music companies. At the time, Amazon argued its Cloud Drive service does not need licenses and said uploaded music belongs to the users, something the labels dispute.

(Reporting by Yinka Adegoke; additional reporting from Poornima Gupta in San Francisco; editing by Andre Grenon)