BEIJING — Top nuclear envoys of North and South Korea met twice Wednesday, raising optimism that Pyongyang could be persuaded to resume discussions on ending its nuclear program after it walked out two years ago.

Seoul’s chief negotiator Wi Sung-lac and his counterpart Ri Yong Ho both described their meetings as constructive after emerging from the talks held at the private Chang An Club in central Beijing.

Neither side gave any details, and although there appeared to be no immediate breakthrough, and Wi said the contacts would continue.

The meetings were the latest in a series of small steps taken in recent months — Wi and Ri met two months ago in Bali, Indonesia — to revive the on-again, off-again six-nation disarmament talks, which include China, the United States, Japan and Russia, besides the two Koreas.

Wednesday’s talks likely focused on what kind of preliminary measures the North must take before the six-party talks can resume, South Korean officials said ahead of the meeting.

China is the host for the talks and has been trying to put them back on track. Separately, the Chinese Foreign Ministry announced Wednesday that North Korean Premier Choe Yong Rim will visit Beijing next week.

Wi will also meet with Chinese nuclear envoy, Wu Dawei, on Thursday, said a South Korean Foreign Ministry official who spoke on condition of anonymity in keeping with government rules.

North Korea walked out of the sputtering nuclear negotiations after the United Nations condemned it for launching a long-range rocket in April 2009. The North claimed it had only launched a satellite, but didn’t convince many. Pyongyang then demonstrated its anger by exploding a nuclear device in May.

The nuclear test bolstered critics in South Korea who said their government shouldn’t give North Korea a long leash when its strategy seems to be to raise tensions to gain more aid and other concessions to shore up a tricky political succession at home.

But in recent months, North Korea — facing food shortages and a listless economy — has repeatedly expressed its willingness to rejoin the talks.

With elections coming up in South Korea, where relations with the North are an emotional issue, President Lee Myung-bak has also indicated a softening of his less compromising policy.

According to his office, Lee said in a speech in New York that denuclearization was important to “establish confidence between South and North Korea.”

South Korea and U.S. officials have demanded the North halt its uranium-enrichment program, freeze nuclear and missile tests and allow international nuclear inspectors back into the country. North Korea wants the talks to resume immediately without any preconditions.

One sticking point has been South Korea’s desire for North Korea to demonstrate it is sincere about disarmament and take responsibility for two deadly attacks last year.

Last year, North Korea shelled a South Korean front-line island, killing four people, and allegedly torpedoed a South Korean warship, killing 46.

During a visit to Russia last month, North Korean leader Kim Jong Il reportedly suggested the North could be open to halting nuclear production and testing if the six-party talks resume.