BEIJING — Three days of U.S.-Chinese talks aimed at ending a costly tariff battle wrapped up Wednesday in an optimistic atmosphere after President Donald Trump said they were “going very well!”

No details were immediately announced, but stocks rose after talks planned for two days were extended to three. Hong Kong’s main market index closed up 2.1 percent and Tokyo rose 1.1 percent.

A Chinese foreign ministry spokesman, Lu Kang, announced the talks had ended. Lu said he had no details and an official statement would be issued later.

The talks that started Monday were the first face-to-face meetings since Trump and his Chinese counterpart, Xi Jinping, agreed on Dec. 1 to suspend further action against each other’s imports for 90 days while they negotiate over U.S. complaints that Beijing steals or pressures companies to hand over technology.

“Talks with China are going very well!” Trump said late Tuesday on Twitter.

Washington wants Beijing to change plans for government-led creation of Chinese leaders in robotics and other advanced technologies.

Chinese officials have suggested Beijing might alter its industrial plans but reject pressure to abandon what they consider a path to prosperity and global influence.

Neither side has given any indication its basic position has changed. Economists say the 90-day window is too short to resolve all the conflicts between the biggest and second-biggest global economies.

“Even if a deal is cobbled together, the more strident trade hawks in the White House and Trump may not sign off,” Mizuho Bank’s Vishnu Varathan said in a report.

Chinese exports to the U.S. have held up despite tariff increases of up to 25 percent on $250 billion of Chinese imports, partly due to exporters rushing to fill orders before more increases hit. Forecasters expect American orders to slump this year.

China has imposed penalties on $110 billion of American goods, slowing customs clearance for U.S. companies and suspending issuing licenses in finance and other businesses.

As the trade talks wound down, China’s top economic official, Premier Li Keqiang, met with CEO Elon Musk of electric car brand Tesla Inc.

“We hope you can get a firm foothold and expand the market,” Li told Musk during the meeting at the Great Hall of the People, the seat of China’s legislature. “We hope your company can become an in-depth participant in China’s opening and a promoter of the stability of Chinese-U.S. relations.”

Tesla broke ground this week in Shanghai on its first factory outside the United States. Musk said production of its Model 3 would start late this year.

China is the largest electric vehicle market and is strongly encouraging its development. Last year it ended restrictions on foreign ownership of EV producers to help spur the industry’s growth, and in July Tesla announced plans to build the Gigafactory 3 facility in Shanghai.

Beijing has tried to defuse pressure from its trading partners for more sweeping changes by offering concessions on investment regulations and stepping up purchases of American soybeans, natural gas and other exports.

However, the official Trump put in charge of the talks, U.S. Trade Representative Robert Lighthizer, has focused on pressing Beijing to scrap or change rules Washington says block market access or improperly help Chinese companies.

U.S. companies also want action on Chinese policies they complain improperly favor local companies. Those include subsidies and other favors for high-tech and state-owned industry, rules on technology licensing and preferential treatment of domestic suppliers in government procurement.

The U.S. demands strike at the heart of a state-led development model the ruling Communist Party sees as a great success over the past three decades and is reluctant to give up.

“These issues are much more difficult to solve immediately but are, frankly, much more compelling to U.S. companies,” said Jake Parker, vice president for China operations of the U.S.-China Business Council, which represents American companies that do business with China.

Beijing also faces pressure over technology from the European Union. The 28-nation trade bloc has filed a challenge in the World Trade Organization against Chinese licensing rules it says hinder foreign companies from protecting and profiting from their technologies.

Companies disappointed failures or delays in carrying out Beijing’s commitments want an enforcement mechanism with “some kind of penalty for not doing what they promised,” said Parker.

“That’s not something that’s going to be done by March,” said Parker. “It’s probably going to take a little longer.”

For its part, Beijing is unhappy with U.S. export and investment curbs, such as controls on “dual use” technology with possible military applications. They say China’s companies are treated unfairly in national security reviews of proposed corporate acquisitions, though almost all deals are approved unchanged.

With cooling economic growth raising the urgency for a settlement, this week’s talks went ahead despite tension over the arrest of a Chinese tech executive in Canada on U.S. charges related to possible violations of trade sanctions against Iran.

The American delegation was led by one of Lighthizer’s deputies, Jeffrey D. Gerrish. It included agriculture, energy, commerce, treasury and State Department officials.

Your support is crucial…

With an uncertain future and a new administration casting doubt on press freedoms, the danger is clear: The truth is at risk.

Now is the time to give. Your tax-deductible support allows us to dig deeper, delivering fearless investigative reporting and analysis that exposes what’s really happening — without compromise.

During this holiday season, stand with our courageous journalists. Donate today to protect a free press, uphold democracy and ensure the stories that matter are told.

SUPPORT TRUTHDIG