SAP AG (NYSE: SAP), Europe's biggest software company, said Tuesday it would acquire e-commercer specialist Ariba Inc. (Nasdaq: ARBA) for $4.3 billion, as it looks to expand its cloud-based services and challenge rival Oracle Corp. (Nasdaq: ORCL).

Shares of Ariba, Inc. (Nasdaq: ARBA) soared 19.21 percent, or $7.23, to close at $44.87 on Tuesday, while the tech-heavy Nasdaq closed down 0.29 percent. The American depository shares of SAP AG (NYSE: SAP) slipped 0.17 percent, to $58.69. Oracle shares rose a dime to $26.36.

Cloud-based collaboration is redefining business network innovation, and we are catching this wave in the early stage of its evolution, SAP co-CEOs Bill McDermott and Jim Hagemann Snabe, said in a statement. The addition of Ariba will create the business network of the future, deliver immediate value to our customers and provide another solid engine for driving SAP's growth in the cloud.

The $45-a'share offer represents a premium nearly 20 percent above Ariba's close on Monday and a 19 percent premium over the average price over the last month.

The deal will be funded from SAP's free cash and a €2.4 billion ($3.1 billion) term loan facility. The deal is expected to close in the third quarter of 2012, subject to Ariba stockholder approval and the usual regulatory approvals.

Ariba, based in Sunnyvale, Calif., has become the second-largest cloud vendor by revenue, and had recorded 2011 revenue of $444 million. For the September 2012 fiscal year, Wall Street expects Ariba to post revenue of $532.8 million, up 20 percent.

Ariba will continue to be led by current management, the statement said. SAP said it intends to nominate Ariba CEO Bob Calderoni to the SAP Global Managing Board after the deal closes.

There has been an acquisition streak of late in the cloud computing business.

In October, Oracle agreed to acquire cloud-based customer service provider RightNow Technologies for $1.43 billion. Less than two months later, SAP responded by agreeing to acquire human resource management software company SuccessFactors for $3.4 billion. In February, Oracle announced the acquisition of Taleo Corp. (Nasdaq: TLEO), a maker of human resouces software, for $1.9 billion.