(CNN) President Donald Trump on Wednesday signed an initial trade deal with senior Chinese leaders that includes pledges from Beijing to more than double its purchases from American farmers in the first year.

The 86-page agreement comes after nearly two years of fraught negotiations and a punishing trade war between the world's two largest economies that hit US soybean producers especially hard

Americantaxpayers have spent about $28 billion bailing out farmers , including payments to trade groups and purchases from food banks.

The pause in the trade war gives Trump something concrete to offer farmers , a crucial element of his Midwestern firewall, heading into the 2020 election.

"Together we are righting the wrongs of the past and delivering a future of economic justice and security," Trump said from the East Room of the White House just as lawmakers at the other end of Pennsylvania Avenue were preparing to vote on two articles of impeachment.

"Most people thought this could never happen," he said.

Trump said he'd visit China in the "not too distant future" to reciprocate a visit to Washington from China's top trade negotiator.

In a letter, China's President Xi Jinping told Trump that the agreement was a sign their two countries could resolve differences through dialogue.

The letter, which China's vice premier and top negotiator, Liu He, read aloud in the East Room during the signing event, struck an optimistic tone about the future of Washington-Beijing ties.

The deal, Xi wrote, was "good for China, the US and the whole world."

Saying he would remain in "close touch" with Trump, Xi said he hoped the US would treat Chinese companies fairly.

Under the agreement, China has promised to buy an additional $12.5 billion in US agricultural products in year one, and then $19.5 billion in year two. Those commitments come atop roughly $24 billion in farm purchases that China made in 2017, before the trade war started.

In exchange, the United States agreed to reduce tariffs on $120 billion in Chinese products from 15% to 7.5%.

Those changes are set to take effect within 30 days of the pact's signing along with the broader deal. However, while China has agreed to purchase more US products, it has not made any specific commitments to reduce tariffs imposed on the US.

Farm Bureau President Zippy Duvall called the agreement an "important step."

"China was once the largest market for U.S. agricultural products but has dropped to fifth largest since retaliatory tariffs were introduced. This agreement will help turn around two years of declining agricultural exports," he said in statement.

Ambassador Robert Lighthizer, the President's top trade negotiator, described the deal as a "massively good first step," describing China's purchases as helping to create access for American companies.

"Are we in an ideal spot? No," Lighthizer told reporters at the White House before the signing. "Is this a massively good first step? Yes."

to buy more US farm products are part of a broader by 2021. The two sides estimate that those purchases will continue beyond the two-year deal into 2022 through 2025. The pledges by Chinato buy more US farm products are part of a broader $200 billion package that includes manufactured goods and energy exportsby 2021. The two sides estimate that those purchases will continue beyond the two-year deal into 2022 through 2025.

Among the products China has promised to buy more of: soybeans, wheat, cotton and pork. A senior administration official told reporters that the US would be "actively monitoring" data sources from both countries to ensure that China is fulfilling its promise.

The initial deal provides better protection to American companies that have long complained of thefts of their intellectual property and trade secrets.

It also potentially removes a major barrier that required the sale of their technology for access, loosens up requirements for banks wanting to operate there and imposes anti-counterfeiting measures that, if broken, would lead to penalties.

Pledges in the deal go further than what China has agreed to in the past, but the agreement doesn't require the government to change any laws or regulations.

"Nobody really understood the deal until today when we released it, so it's a much bigger deal than people thought," said Trump, who spent more than 30 minutes thanking Cabinet members, members of Congress and executives from some of the nation's biggest companies, including General Electric and Citibank.

The President said the next round of negotiations -- which are expected to address tougher issues such as Chinese subsidies to domestic companies and state-owned enterprises -- will start "soon."

Tariffs, he said, would stay on as leverage against China and come off only when the administration completes the next phase of the deal.

"We have pretty strong cards," said Trump.

The two countries also reaffirmed commitments not to devalue their currency for competitive advantage that they have pledged with the Group of 20. A senior administration official said that the provision, like most of the pact, would be enforceable.

Business leaders urged the Trump administration to move forward with the next round of talks as soon as possible.

"We hope this deal will usher in a new era of trust between both countries and pave the way for Phase 2 negotiations to begin in a timely manner," said US Chamber of Commerce CEO Thomas Donohue.

This story has been updated with more reaction and more details from the agreement.