SAN FRANCISCO — Intel, the world’s largest computer chip manufacturer, will invest $7 billion to finish a factory in Arizona, adding 3,000 jobs, the company’s chief executive said on Wednesday after meeting with President Trump at the White House.

The completion of the factory, which will complement two other Intel semiconductor plants in Chandler, Ariz., had been under consideration for several years.

Standing beside Mr. Trump in the Oval Office, Brian Krzanich, Intel’s chief executive, said the company had decided to proceed now because of “the tax and regulatory policies we see the administration pushing forward.”

Mr. Trump said: “The people of Arizona will be very happy. It’s a lot of jobs.”

He said Intel called the White House several weeks ago to coordinate the announcement. That outreach illustrates the tightrope that Silicon Valley companies are walking as they deal with a president most of them did not want to see in office.