President Donald Trump announced Thursday that his long-expected summit with North Korean leader Kim Jong Un will take place in Singapore on June 12.

"The highly anticipated meeting between Kim Jong Un and myself will take place in Singapore on June 12th. We will both try to make it a very special moment for World Peace!" the president tweeted.

The announcement comes just hours after three American detainees were freed from North Korea and arrived back in the U.S.

It will be the first time a sitting U.S. president meets with the leader of North Korea.

Trump has said he hopes that the summit will lead to the denuclearization of the Korean Peninsula.

The deal to meet is a notable shift in what has been, at times, a tense and confrontational relationship between the two men, marked by caustic language.

Trump has repeatedly derided Kim as "Rocket Man" or "Little Rocket Man," and said in August that if North Korea threatened the U.S., "they would be met with fire and fury like the world has never seen."

Kim has referred to Trump as "a gangster" and previously said he would "tame the mentally deranged U.S. dotard with fire."

Trump, however, says the U.S. is developing a better relationship with the North Korean leader. Secretary of State Mike Pompeo recently visited North Korea and met with Kim.

Vice President Mike Pence said Thursday that the release of Americans was "all a direct result of the strong and clear leadership that President Trump has provided on the world stage in this moment. Think about how far we've come in the last year."

"From very early in this administration, President Trump changed the policies of the United States from an era of strategic patience with North Korea to move toward the kind of campaign that would bring economic and diplomatic pressure to bear while reserving all other options, with the clear objective — of achieving the denuclearization of the Korean peninsula," Pence told NBC's Andrea Mitchell in an interview.

"We appreciate Kim Jong Un's efforts so far," Pence said, but noted that the administration has "no illusions" about the challenges ahead.

The announcement of the summit comes after punishing sanctions were leveled against North Korea in response to its missile and nuclear tests.

Last month, Kim said he would suspend nuclear and missile tests, stating that further ones were unnecessary. He also met South Korean President Moon Jae-in at a historic summit in late April.

The White House has credited its campaign of "maximum pressure" for creating an atmosphere for dialogue with North Korea.

But it is unclear what may come out of the talks. Trump has stated that his goal is the denuclearization of the Korean Peninsula, but added, "If the meeting, when I'm there, isn't fruitful, I will respectfully leave the meeting."

Earlier Thursday, Trump expressed gratitude to Kim for the return of the detainees and said he was optimistic about their planned talks.

"We want to thank Kim Jong Un," the president said as he greeted the returning Americans. "I really think he wants to do something ... and bring his country into the real world. I really think we have a very good chance of doing something very meaningful."

The detainees, Kim Hak-song, Kim Dong-chul and Kim Sang-duk, who is also known as Tony Kim, were granted amnesty from North Korean labor campsby Kim after spending up to two years in detention accused of crimes against the regime.

"It is like a dream. We are very, very happy," Kim Dong-chul told reporters through a translator after arriving back in the U.S.