CVS Health and Aetna shareholders have approved a merger between the two health-care giants, bringing them one step closer to finalizing a deal that could transform the industry.

In December, CVS announced it would buy Aetna for about $69 billion in cash and stock. The deal would combine CVS' drugstores and pharmacy benefits manager platform with Aetna's insurance business, blurring traditionally distinct lines in hopes of lowering costs.

The two companies held special meetings on Tuesday for shareholders to vote. According to preliminary results, more than 98 percent of CVS shareholders' ballots and 97 percent of Aetna shareholders' ballots were in favor of the deal, the companies said in separate press releases.

The two now need the Department of Justice to approve the deal. They expect the transaction to close in the second half of the year.

"When this merger is complete, the combined company will be well-positioned to reshape the consumer health care experience, putting people at the center of health care delivery to ensure they have access to high-quality, more affordable care where they are, when they need it," CVS Health CEO Larry Merlo said in a statement.

The deal comes as the retail and health-care industries are coming under pressure. Drugstores like CVS are finding fierce competition from e-commerce, particularly Amazon, which CNBC has reported to be interested in selling prescription drugs. It already sells over-the-counter drugs, including an exclusive line of Perrigo products.

Health-care companies, including insurers, are searching for ways to lower costs. Health spending equals 18 percent of the nation's gross domestic product, and that number is expected to reach 20 percent by 2025.

Amazon CEO Jeff Bezos, J.P. Morgan CEO Jamie Dimon and Berkshire Hathaway CEO Warren Buffett have even joined the health-care space. They're partnering to try to tackle the "hungry tapeworm on the American economy," as Buffett dubbed health-care costs in January.

Since the CVS-Aetna deal was announced, grocer Albertsons said it would acquire drugstore chain Rite Aid. Pharmacy retailer Walgreens Boots Alliance was reportedly considering buying the rest of the wholesale drug distributor AmerisourceBergen it doesn't already own, but talks have cooled.

And last week, health insurer Cigna said it hopes to acquire pharmacy benefits manager Express Scripts, becoming the latest example of convergence in the sector.

CVS and Aetna have touted their combination as a way to use CVS' retail stores to help rein in health-care costs. They're hoping to get more people into their walk-in clinics at drugstores and keep them out of more expensive sites like emergency rooms.

"The combination of CVS Health and Aetna brings together two complementary businesses with an expanded set of unique capabilities to create a new community-based open health care model that is easier to use and less expensive for consumers," Merlo said in a statement.

Merlo and Aetna Chairman and CEO Mark Bertolini told CNBC that the deal will reduce costs for consumers immediately.

Within the next year or so, CVS and Aetna expect MinuteClinics to perform about 90 percent of services provided in primary care facilities, up from about 40 to 45 percent now, Thomas Moriarty, CVS' executive vice president, chief policy and external affairs officer, and general counsel told a congressional panel last month.

The Justice Department requested more information from the two companies last month, but CVS' Merlo said the companies built that into the timeline and still expect the deal to close in the second half of the year. CVS reiterated that expectation Tuesday.

Shares of CVS dipped 0.6 percent and Aetna shares gained 0.2 percent.