President Obama meets with troops at the dining hall at Camp Boniface during his tour of the Demilitarized Zone (DMZ), the tense military border between North and South Korea, in Panmunjom, South Korea. (Pablo Martinez Monsivais/AP)

President Obama made his first visit to Korea’s demilitarized zone Sunday, telling U.S. troops that the contrast between South and North Korea “could not be starker.”

Addressing 50 U.S. soldiers in the mess hall at this U.N. command post, Obama thanked them for their service at “freedom’s frontier” on the divided peninsula.

Obama said that the differences in freedom and prosperity between the two nations were striking and that “the reason the South is doing well can be attributed to the resilience of their people and their talents and hard work.”

“When I think about the transformation that has taken place in my lifetime,” Obama said, “it is directly attributable to the long line of soldiers, sailors, airmen, Marines and Coast Guard who are willing to create space and opportunity for freedom and prosperity. . . . I could not be prouder of you.”

The president wore a black bomber-style jacket presented to him by Gen. James Thurman, the United Nations’ commanding general here.

Obama then met with South Korean troops and received a tour and briefing at Observation Post Ouellette, the South’s closest observation post to the military demarcation line. The post is manned 24 hours a day, seven days a week by South Korean soldiers who keep an eye on North Korean troops on the other side.

At the observation post, Obama used a pair of binoculars to look across the demarcation line into North Korea, where a flag flew above a set of military buildings.

Obama took his tour of the 155-mile-long swath of land that divides the peninsula just hours after arriving in Seoul for a three-day visit to participate in a nuclear security summit with more than 50 world leaders. Administration officials said Obama’s visit was intended, in part, to send a message to the North, whose leadership has announced plans to launch a long-range rocket in mid-April, an apparent violation of its pledge to halt weapons tests in exchange for food aid from the West.

The trip marked Obama’s third to Korea since taking office, but his first since North Korea’s 20-something leader, Kim Jong Eun, assumed power in December after the death of his father, Kim Jong Il. U.S. officials said they had received a message from Pyongyang that the North planned to sound a siren at noon Sunday to commemorate the 100th day since the death of the elder Kim.

White House aides said Obama will use his time at the nuclear summit to lobby other nations, including China and Russia, to increase pressure on Pyongyang to halt the rocket launch, which coincides with the 100th anniversary of the birthday of the North’s first communist leader, Kim Il Sung.

The demilitarized zone runs about one mile wide on each side of the military demarcation line that has divided the peninsula roughly along the 38th parallel since the end of the Korean War.

Though Obama had not toured the DMZ during two previous trips to South Korea, there is ample precedent for U.S. presidents to visit the zone. George W. Bush visited in 2002, Bill Clinton in 1993 and Ronald Reagan in 1983.

In 2010, Secretary of State Hillary Rodham Clinton and Defense Secretary Robert Gates visited the site to commemorate the 60th anniversary of the Korean War.