The offer of $109 a share in cash is a 19 percent premium to NetSuite’s closing share price Wednesday of $91.57. It will be immediately accretive to Oracle’s earnings on an adjusted basis, in the full fiscal year after closing, Oracle co-Chief Executive Officer Safra Catz said in statement Thursday.

Oracle, which sells software to big corporations, has been trying to shift to cloud-based products, which made up only about 8 percent of total sales in its fiscal fourth-quarter. Buying NetSuite -- which provides software that helps companies manage their financials -- will help Oracle compete against the likes of SAP SE, Salesforce.com Inc. and Microsoft Corp.

“NetSuite is really pioneering cloud and this will certainly add to Oracle,” said Bill Kreher, an analyst at Edward Jones & Co. “I think acquisitions are certainly consistent with the company’s long-term pedigree and strategy. You’ve got to pay for that type of growth.”

The deal is one of the biggest for Oracle, after winning a drawn-out hostile takeover for PeopleSoft Inc. in 2005 for $10.3 billion. It shows the company is stepping up efforts with acquisitions after doing mostly smaller purchases in recent quarters. In May, it bought Opower Inc. for $532 million, and in the same week purchased Textura Corp. for $663 million.

The relationship between Oracle and NetSuite goes back decades. Zach Nelson, NetSuite’s CEO, previously ran Oracle’s marketing operations in the 1990s. Meanwhile, Oracle co-founder Larry Ellison is NetSuite’s largest investor. As of March, Ellison and his family owned about 45.4 percent of NetSuite’s common stock, according to a company filing. Ellison has “control over approval of significant corporate transactions,’’ according to the filing.

A deal has been speculated about for months, gaining traction in recent weeks. NetSuite’s shares surged 9.1 percent Wednesday amid rumors of an agreement. Oracle shares were little changed at $41.55 at 10:08 a.m. in New York Thursday. NetSuite shares surged 18.2 percent to $108.23.

Founded in 1998, NetSuite was one of the first companies to distribute business applications over the internet. It had a market capitalization of $7.37 billion before the deal was announced. In May, NetSuite unveiled software that unifies various accounting functions -- for example, billing, revenue recognition, orders and subscriptions -- into one system. NetSuite has more than 30,000 customers, the bulk of which are small and mid-size companies.

The company’s sales growth has been consistently strong -- expanding at a rate of more than 30 percent for the past several quarters. In its last report, San Mateo, California-based NetSuite posted both sales and adjusted earnings that topped analysts estimates.

While big internet and software deals have generally been rare, 2016 is proving to be an exception as large technology companies move to snap up slightly smaller cloud software peddlers. Earlier this year, Microsoft agreed to buy LinkedIn for $26.2 billion, spurring speculation that more such deals would occur as companies and private equity firms alike compete for the assets.

The NetSuite-Oracle merger is also the latest in a slew of business software acquisitions: Salesforce this year spent more than $2.5 billion to buy Demandware, which sells cloud-based e-commerce software, and Symantec said it would purchase Blue Coat Systems Inc. for $4.65 billion.