After months of leaks and speculation, Verizon Communications Inc. has emerged as the most likely buyer of Yahoo! Inc. The deal, which may be announced in the next few days according to people familiar with the matter, will likely bring to an end the tumultuous reign of Chief Executive Officer Marissa Mayer, who tried and failed to re-invent Yahoo as an independent company. If finalized, the nation’s largest wireless carrier would add the iconic web pioneer and its millions of daily users to a growing stable of media properties. Verizon is discussing a price close to $5 billion for Yahoo’s core internet business, one of the people said. While the deal doesn’t include the company’s patents at this stage, it does include real estate assets. The non-core sale of intellectual property assets will be sold separately, a person familiar with the deal said, and won’t be finished for another month at least. They could fetch “hundreds of millions of dollars,” the person said. “The buyer that could make the most out of these assets has apparently won,” said Roger Entner, an analyst with Recon Analytics LLC. “No one could get more out of Yahoo’s businesses than Verizon.” A representative for Verizon declined to comment. A representative for Sunnyvale, California-based Yahoo couldn’t immediately be reached for comment. An agreement would end a months-long bidding process for Yahoo, which began earlier this year when Mayer said the company would explore strategic alternatives, including selling its core assets that once made it the gateway to the internet. After more than three years at the helm without delivering on a turnaround strategy, Mayer finally bowed to rising shareholder ire after the collapse of a plan to spin off Yahoo’s stake in Alibaba Group Holding Ltd. in a way that would minimize the tax impact for investors. Alibaba, the largest e-commerce provider in China, emerged as the most valuable piece of Yahoo, and investors were seeking a way to realize some of those gains. After U.S. regulators failed to give prior approval for the transaction’s tax status, Yahoo was forced to jettison the plan. AT&T Inc. and Quicken Loans Inc. founder Dan Gilbert, as well as buyout firms Vector Capital Management and TPG were also active in the bidding process until the end. Yahoo hasn’t told other parties they are out of the process, according to a person familiar with the negotiations. Verizon sees a complementary set of businesses that could find a home alongside its AOL properties. With the wireless industry maturing, Verizon has been buying up internet and advertising technology companies, including AOL, and presenting itself as the best bet to take on Alphabet Inc.’s Google and Facebook Inc. in mobile advertising. Yahoo has millions of users, a collection of websites including Flickr, Tumblr and Yahoo Finance and Sports and some useful digital-ad tech like Flurry and BrightRoll. Together with AOL, the new Yahoo under Verizon may have a better chance of competing in a digital ad market dominated by two big players. “This will expand Verizon’s advertising base by 200 million more visitors,” Entner said. “This will be a large driver of the advertising engine. They also can collect a whole lot more user data to make the ads more relevant. They will be in more places with better ads.” Yahoo shares were up 0.9 percent at 12:18 p.m. to $39.21. They have gained 18 percent so far this year. Bloomberg