Hewlett-Packard Co had considered buying business software company Tibco Software Inc until two weeks ago when talks fizzled, two sources familiar with the matter told Reuters.

The talks come as newly minted HP chief executive Leo Apotheker is expected to resort to acquisitions to beef up a software division that now just accounts for less than 3 percent of revenue.

Tibco, which was spun off from Reuters in 1999 and whose market capitalization is over $4 billion, had been working with its long time financial adviser Goldman Sachs to explore the opportunity, the sources said.

Tibco and Goldman Sachs declined to comment. A spokeswoman for HP was not immediately reachable.

It was not clear why the talks fell apart or if they will be resumed, although the tech giant is currently scouring the industry for other software targets, the sources said.

Tibco has been the subject of takeout rumors for the past several years, yet the company has never disclosed that it has been in talks to sell itself.

Analysts say the rally that has caused Tibco's stock to more than double over the past year has been fueled by stronger-than-expected sales of its software, which forms the backbone of sophisticated business computer networks.

They have been consistent in hitting quarters and in delivering earnings growth, said Pacific Crest Securities analyst Nabil Elsheshai.

For HP, the search for software company acquisitions has been crucial to Apotheker's plan to rejuvenate the legendary company.

Apotheker, a former SAP AG CEO, has called software the glue of the sprawling computing giant's operations and has said he wants to restore HP's reputation for innovation - a reputation stemming from its early days as a founding father of Silicon Valley - and invest in research to galvanize growth.

HP's share price has dwindled since former CEO Mark Hurd - a cost-cutter popular with shareholders -- left the company.

Apotheker is also under pressure to appease investors and fend off a clutch of rivals ranging from Oracle Corp to IBM.

The centerpiece of his first strategy presentation in March to investors was a plan to expand into the highly competitive cloud computing market, where services are hosted remotely in data centers.

HP has spent $31 billion on acquisitions since 2006, making such high-profile purchases as smartphone maker Palm and networking company 3Com, and Wall Street analysts expect Apotheker to sustain that tradition while focusing on areas it lacks, including software.

(Additional reporting by Jim Finkle in Boston and Edwin Chan in Los Angeles; editing by Kenneth Li, Andre Grenon and David Gregorio)