SEOUL, South Korea — Secretary of State Mike Pompeo extended an olive branch to senior North Korean officials on Wednesday: “All the opportunities your people so richly deserve” in exchange for the shutting down of the North’s nuclear weapons program.

“For decades, we have been adversaries,” Mr. Pompeo said in a toast during a lunch in honor of his visit to Pyongyang, the North Korean capital. “Now we are hopeful that we can work together to resolve this conflict, take away threats to the world and make your country have all the opportunities your people so richly deserve.”

Mr. Pompeo arrived in Pyongyang on Wednesday on a mission to smooth any remaining wrinkles in the weekslong preparations for a planned summit meeting between North Korea’s leader, Kim Jong-un, and President Trump, according to pool reports by journalists traveling with Mr. Pompeo. He also secured the release of three American citizens detained in the isolated country on charges of committing espionage and other vaguely defined “hostile acts.”

In his planned meeting with Mr. Kim, Mr. Trump hopes he can persuade North Korea to abandon its nuclear weapons by offering better ties with Washington that would help Mr. Kim rebuild his impoverished country. Mr. Kim has said that he is willing to discuss denuclearization, but that Washington needs to make North Korea feel secure enough to focus on economic recovery.