WASHINGTON/BEIJING (Reuters) - The United States and China are close to agreement on the first phase of a trade deal, U.S. President Donald Trump said on Tuesday, after top negotiators from the two countries spoke by telephone and agreed to keep working on remaining issues.

Trump said Washington was in the “final throes” of work on a deal that would defuse a 16-month trade war with Beijing, but also underscored Washington’s support for protesters in Hong Kong, a potential huge sore point with China.

China said it had summoned U.S. Ambassador Terry Branstad on Monday to protest the passage in the U.S. Congress of the Hong Kong Human Rights and Democracy Act, saying the bill amounted to interference in a Chinese internal matter.

“We’re in the final throes of a very important deal, I guess you could say one of the most important deals in trade ever. It’s going very well but at the same time we want to see it go well in Hong Kong,” Trump told reporters at the White House.

He said had a very good relationship with Chinese President Xi Jinping, and expected him to ensure a positive outcome in the Chinese-ruled city of Hong Kong, where pro-democracy parties won almost 90% of 452 district council seats in Sunday’s elections.

“I think that President Xi can make that happen. I know him and I know he’d like to make it happen,” Trump said, without elaborating on what exactly he expected Xi to do.

Trump’s upbeat comments about the trade talks lifted markets, with Wall Street’s three major indexes hitting all-time highs on Tuesday.

His remarks followed a telephone call on Tuesday by U.S. Trade Representative Robert Lighthizer and Treasury Secretary Steven Mnuchin with Chinese Vice Premier Liu that was disclosed by China’s Commerce Ministry.

It said the negotiators discussed core issues related to the phase one deal and reached “a common understanding on resolving relevant problems.”

Completion of a phase one deal had been expected in November, but trade experts and people close to the White House said last week it could slide into the new year, given China’s pressure for more extensive tariff rollbacks.

White House adviser Kellyanne Conway told Fox News the United States and China were “getting really close” on a “phase one” trade deal. She said Trump wanted to “do this in phases, in interim pieces because it’s such a large, historic trade deal.”

Senate Finance Committee Chairman Chuck Grassley, an Iowa Republican, told reporters on Tuesday that he believed the initial deal with China could be done before year end.

He said China had invited Lighthizer and Mnuchnin to visit Beijing for in-person talks and they were willing to go if they saw “a real chance of getting a final agreement.”

FILE PHOTO: Containers are seen at the Yangshan Deep Water Port in Shanghai, China August 6, 2019. REUTERS/Aly Song

The U.S. trade representative and the Treasury did not respond to requests for comment. A source familiar with the trade talks said the U.S. officials could go to Beijing after Thursday’s Thanksgiving holiday.

In October, Trump said he expected to quickly dive into a second phase of talks once “phase one” had been completed, focusing on harder issues such as Chinese demands that U.S. companies transfer their technology to Chinese rivals.

U.S. and Chinese officials, lawmakers and trade experts warn such follow-on negotiations may prove difficult given the November 2020 U.S. presidential election, the difficulties in getting the first stage done, and the White House’s reluctance to work with other countries to pressure Beijing.

“We continue to negotiate,” Conway said. “But those forced tech transfers, the theft of intellectual property, the trade imbalance of a half a trillion a year with the world’s second largest economy, China - this makes no sense to people.

“But the president wants a deal. But President Trump always waits for the best deal,” she said.

Commerce Minister Zhong Shan, central bank governor Yi Gang and vice head of state planner Ning Jizhe also participated in the phone call with the top trade negotiators, Beijing said.