Image“This was not a hard decision,” Brad Smith, Microsoft’s president and general counsel, said in an interview.CreditCreditDavid Ryder/BloombergREDMOND, Wash. — Microsoft said Friday that it would sell the military and intelligence agencies whatever advanced technologies they needed “to build a strong defense,” just months after Google told the Pentagon it would refuse to provide artificial intelligence products that could build more accurate drones or compete with China for next-generation weapons.The announcement, made quietly in a small, town-hall-style meeting with the software giant’s leadership on Thursday, then planned to be published on a blog Friday afternoon, underscores the radically different paths these leading American technology firms are taking as they struggle with their role in creating a new generation of cyberweapons to help, and perhaps someday replace, American warriors.But the divergent paths taken by Google and Microsoft also underscore concerns inside the American defense and intelligence establishments about how the United States will take on a rising China.The Chinese government has, in just the past two years, set goals for dominance in the next decade in artificial intelligence, quantum computing and other technologies that it believes will allow its military and intelligence agencies to surpass those of the United States. Pentagon officials have questioned how committed domestic technology companies are to keeping the United States on the leading edge, the way Raytheon, Boeing, IBM and McDonnell Douglas did in the Cold War.Google encountered fierce opposition from young engineers to the company’s participation in “Project Maven,” a program to improve how drones recognize and select their targets. Google declared a few weeks ago it would not bid on a multibillion dollar contract to provide the Pentagon with “cloud services” to store and process vast amounts of data. Amazon, for its part, appears willing to supply its services to the military and intelligence agencies, and it runs the information cloud services that power the Central Intelligence Agency.Even before Friday’s announcement, Microsoft seemed like the only plausible alternative for the Pentagon’s giant cloud project, called JEDI, in which Amazon is considered the front-runner.But the Microsoft announcement may have a greater impact on future technologies, including warning systems and weapons powered by artificial intelligence. And Microsoft’s leadership, after brief debates this summer, concluded that by dropping out of the bidding, Google was also losing any real influence in how the weapons are used.“This was not a hard decision,” Brad Smith, Microsoft’s president and general counsel, said in an interview in his office. “Microsoft was born in the United States, is headquartered in the United States, and has grown up with all the benefits that have long come from being in this country.”But Mr. Smith seemed to be trying to strike a middle ground.He has sued the United States government repeatedly to halt Washington’s efforts to get information stored in its servers about customers, and he is pressing for new international agreements to limit how the United States and its adversaries can use cyberweapons.He also was to argue in the blog post that “to withdraw from this market is to reduce our opportunity to engage in the public debate about how new technologies can best be used in a responsible way.“We are not going to withdraw from the future,” he said.