Washington (CNN) The US and South Korea have reached a preliminary agreement on the cost of keeping nearly 30,000 troops in South Korea, two State Department officials said, alleviating fears among President Donald Trump's advisers that he could move to withdraw US troops during his upcoming summit with North Korea's leader.

Under the revised Special Measures Agreement, South Korea would boost its financial contribution to nearly $1 billion, according to a State Department official and South Korean media. That's an increase on the about $800 million South Korea had been paying per year during the previous five-year commitment.

The most recent agreement lapsed at the end of last year. Since then, Trump had been pressuring South Korea to double its financial support to $1.6 billion, making some of his own administration officials worry that the President might offer to withdraw US forces from South Korea during his second summit with Kim Jong Un later this month.

"Both sides are committed to working out remaining technical issues as quickly as possible," a State Department official said in a statement. "The United States appreciates the considerable resources the ROK provides to support the Alliance, including its contribution towards the cost of maintaining the presence of US forces in Korea through the Special Measures Agreement."

Steve Biegun, the US special representative on North Korea, said last week there have been no discussions with North Korea about a withdrawal of US troops in South Korea.

"We are not involved in any diplomatic discussion -- full stop -- that would suggest this tradeoff. It has never been discussed," he said last week.

Yet Biegun also said the Trump administration is "prepared to discuss many actions that could help build trust" between North Korea and the US.

The State Department said Biegun will travel to the North Korean capital of Pyongyang Wednesday to prepare for the upcoming second summit.

A one year agreement

The revised Special Measures Agreement is not be a long term fix: it is only a one year agreement, with the possibility for a one year extension, according to the State Department source. The previous agreements had been for five years. A US official familiar with the negotiations told CNN that South Korea proposed the dollar figure and the US agreed to it only for a year. This means American and South Koreans officials will have to come back to the negotiating table on this same topic again later this year. Another round of talks will allow the Trump administration to demand more money, once again.

The agreement could also still get nixed by Trump. It is unclear if the president has personally signed off on what his top negotiators have agreed to. The National Security Council did not respond when asked if Trump has signed off on the current agreement.

The preliminary agreement relieved considerable anxiety in Washington and Seoul, but experts said the one-year span of the new deal could still tempt Trump to put the future of US forces in South Korea into play during his meeting with Kim. They pointed in particular to Trump's surprise decision during his first summit with the North Korean dictator to suspend US-South Korea military exercises, unbeknownst to his advisers.

"The Koreans have spent some money to batten down the hatches before this summit," said Mike Green, the former director of Asian affairs at the National Security Council under President George W. Bush. "But it doesn't mean (Trump) won't say something again about US Forces Korea because his statements in Singapore were completely unscripted and surprising to his own team."

If the agreement goes through, Green said it would reduce the "danger" of Trump proposing a withdrawal of US forces during his meeting with Kim.

Trump has long publicly lamented the cost of stationing US troops around the world and has privately pressed his advisers about the possibility of withdrawing US forces from the country. Last May, The New York Times reported Trump ordered the Pentagon to bring him options on reducing the US troop presence in South Korea.

But Trump insisted in an interview that aired Sunday on CBS that he has "no plans" to withdraw US troops from South Korea and claimed to have "never even discussed removing them," but said "maybe someday" he would withdraw US forces from the country.

"I mean, who knows. But, you know, it's very expensive to keep troops there," Trump said, even though US military officials have said it is cheaper to house those troops in South Korea than in the US.

It's comments like those that also heightened anxiety on Capitol Hill, prompting lawmakers last year to insert a provision into the National Defense Authorization Act disallowing the President to reduce the troop figure in South Korea below 22,000 without certification from the defense secretary. Additional legislation is currently pending that would further limit the President's ability to withdraw troops. Both would likely be challenged on constitutional grounds should Trump make such a move.

His top national security advisers have repeatedly urged him against doing so and stressed the benefit of having US military bases in the region.

Under pressure

JUST WATCHED Trump: Kim Jong Un has been open, terrific Replay More Videos ... MUST WATCH Trump: Kim Jong Un has been open, terrific 02:52

Trump is under pressure to demonstrate progress in his diplomatic opening with Pyongyang. Despite saying after his first meeting with Kim that the nuclear threat from North Korea had been eliminated, the regime is continuing to develop its nuclear program. The hermit kingdom has insisted any steps to roll back the program be accompanied by parallel measures, such as sanctions relief.

It is the economic benefits of denuclearization that Trump sought to emphasize during his last summit with Kim, held in June in Singapore. But with the next summit nearing, some in the administration worried Trump could raise the future of US troops in South Korea as another incentive to prod Kim along.

As the Special Measures Agreement deadline approached late last year, US and South Korean officials were poised to reach an agreement that would have likely increased South Korea's financial commitment, but kept it under $1 billion.

Over the course of the negotiations, which began in early spring, Trump was not regularly updated in detail, and US officials hoped to wrap up talks and then sell the agreement to Trump as a win. But the plan was inadvertently disrupted by South Korean President Moon Jae-in.

During a conversation late last year, as Trump was once again lamenting what he saw as an insufficient financial commitment from South Korea, Moon reassured Trump that negotiations were underway and that he believed they were close to a new cost-sharing agreement, a US official and source briefed on the matter told CNN.

The revelation prompted Trump to up the ante, telling his aides that US negotiators should demand double the current South Korean financial commitment, the sources said.

The demand stalled negotiations between the two sides for weeks until the White House approved South Korea's latest offer for just under $1 billion over the weekend.

It was not immediately clear what prompted Trump to accept the latest offer, which fell short of the $1 billion threshold most officials involved believed would need to be met in order for Trump to accept.

Moon has come under political pressure from members of his left-leaning party to limit South Korea spending on US troops. He, along with other senior members of the party, are veterans of a student democracy movement in the 1980s that came to view the US military presence skeptically.

Some senior members of Moon's government have openly questioned whether US troops would need to remain in South Korea if a peace treaty is signed ending the Korean War, one of the possible outcomes of Trump's North Korean diplomacy.

Troop withdrawals elsewhere

JUST WATCHED Trump touts 'good relationship' with N. Korea Replay More Videos ... MUST WATCH Trump touts 'good relationship' with N. Korea 02:57

While the President's advisers were breathing a sigh of relief in light of the preliminary agreement, Trump had given them more reasons to worry in recent weeks. His recent decisions to begin the withdrawal of US forces from Syria and Afghanistan heightened fears among the President's advisers that he could be inching toward a similar move in South Korea, multiple sources familiar with the matter said.

Trump is also now surrounded by fewer top advisers who served as bulwarks against some of his impulses, such as Defense Secretary Jim Mattis and White House chief of staff John Kelly, who left the administration in December. Mattis resigned in part over Trump's decision to withdraw US forces from Syria.

Others inside Trump's administration, such as Joint Chiefs Chairman Joseph Dunford and national security adviser John Bolton, are likely to argue against withdrawing US troops from South Korea, one official said. But as with his Syria decision, Trump has surprised aides with abrupt decisions.

The concern among Trump administration officials, sources said, has been that Trump could put it on the table during one-on-one discussions with Kim, just as he emerged from his first summit with Kim and announced he was suspending US-South Korean joint military exercises. That decision caught Mattis by surprise. It also came without advance warning to Seoul.

CNN's Ryan Browne contributed to this report.