By Liana B. Baker

SAN FRANCISCO (Reuters) - The two biggest U.S. fantasy sports companies DraftKings and FanDuel said on Friday they would merge to cut legal bills and advertising spending after tussling for years to win customers.

The tie-up could reduce costs as both companies separately fund legal defenses and lobbying for legislation to authorize fantasy sports in states that have declared it illegal.

Financial terms of the merger were not disclosed. The companies had each been valued at over $1 billion before authorities including New York Attorney General Eric Schneiderman began a crackdown on the industry last year.

Fantasy sports have surged in popularity as websites have made it easier to create fictional teams of athletes from sports leagues, and monitor statistics competitively.

Daily fantasy sports, a turbocharged version of the season-long game, has become a multibillion dollar industry. Players draft teams for one evening's game, enabling fans to spend money on contests with a frequency critics compare to sports betting.

The deal will be structured as a merger of equals. DraftKings Chief Executive Jason Robins will become CEO, and FanDuel CEO Nigel Eccles will be chairman. Each company will receive three board seats and there will be one independent director.

Robins and Eccles said in a joint interview that deal discussions started last October, after running into roadblocks in New York, and then spending time in various state capitals together.

"We both have really big visions on how to disrupt sports, and it led us to think that together we could build something to compete against ESPN and Yahoo," Eccles said.

The announcement comes after the companies' $12 million settlement over false advertising claims with the New York attorney general last month.

The merger could reduce advertising costs after DraftKings and FanDuel both spent aggressively on TV and online in the past years as they battled for market share against each other.

The deal will "help the combined company accelerate its path to profitability," they said in a joint statement.

The merger is subject to regulatory approval and expected to close in the second half of 2017. It is likely to attract the attention of antitrust authorities since it would combine two market leaders.

High-profile investors backing the companies include Fox Sports, Major League Baseball, the National Hockey League, KKR & Co LP, Raine Group, Google Capital and the venture arms of Time Warner Inc and Comcast Corp.