DraftKings and FanDuel — the top two daily fantasy-sports gaming sites, which have faced pushback from regulators accusing them of running gambling operations — announced they have entered into a merger agreement.

Financial terms were not disclosed. The merger is expected to close in the second half of 2017, subject to regulatory approvals and other closing conditions.

“We have always been passionate about providing the best possible experience for our customers and this merger will help advance our goal of building a transformational global sports entertainment platform,” DraftKings CEO Jason Robins said in a statement. “Joining forces will allow us to truly realize the potential of our vision, and as a combined company we will be able to accelerate the pace of innovation and bring a richer experience to our customers than we ever could have done separately.”

Added FanDuel CEO Nigel Eccles, “While both companies have accomplished much already, this transaction will create a business that can offer a greater variety of offerings, appealing to new users, including the tens of millions of season-long fantasy players that haven’t yet tried our products.”

At closing, Robins will become CEO of the newly combined company and Eccles will become chairman of the board. In addition, the board will be composed of three directors from DraftKings, three directors from FanDuel and one independent director.

The new company will be co-headquartered in New York and Boston. DraftKings and FanDuel, which both have about 320 employees, didn’t say what the merged company will be named.

DraftKings and FanDuel insist that their contests do not represent gambling activity. But the companies have faced regulatory restrictions in numerous states. For example, both DraftKings and FanDuel were forced to suspend their paid fantasy-sports contests in New York earlier this year after a cease-and-desist order by the state’s attorney general; subsequently, the New York legislature passed a bill in September that legalizes daily fantasy-sports. In all, nine states have passed legislation legalizing fantasy sports, while levying licensing fees and taxes on the gaming companies.

The merger of FanDuel and DraftKings, which offer daily, weekly and season-long sports fantasy contests, will bring together two fantasy sports innovators to better serve consumers. The operational efficiencies and cost savings that are expected to result from the merger will drive a greater focus on developing new products and features, including more variety in contest formats, loyalty programs, enhanced social functionality and ancillary sports-oriented content and experiences, all aimed at creating a more diverse, exciting and appealing experience for fantasy sports players and all sports fans. The merger will also help the combined company accelerate its path to profitability.

Fantasy sports is a multibillion-dollar industry: Currently in the U.S., an estimated 57 million people play fantasy-sports games, according to DraftKings and FanDuel. The companies said that together, they will be able to boost their investment in advertising, accelerate growth in the category by driving fan engagement, and more efficiently reach those players.

In addition, according to DraftKings and FanDuel, they will be able to “accelerate work with government officials to continue to develop a standard regulatory framework” for the industry.

Boston-based DraftKings, founded in 2012, has raised about $600 million to date. Investors including 21st Century Fox’s Fox Sports, Revolution Growth, Major League Baseball, the National Hockey League, Major League Soccer, the Madison Square Garden Co., Legends, a stadium concessionaire owned by the New York Yankees and Dallas Cowboys, Atlas Venture, DST Global, GGV Capital, the Kraft Group, the Raine Group and Wellington Management Co.

Founded in 2009 in Scotland, FanDuel has raised about $412 million in funding from KKR, Google Capital, Time Warner’s Turner Sports, Shamrock Capital, NBC Sports Ventures, Comcast Ventures, Pentech Ventures, Piton Capital and Bullpen Capital.