The shootout between North and South Korean guard posts in the buffer zone lasted for nearly one minute.
North Korean machine gun rounds hit the wall of the South Korean guard post, Colonel Lee Hong-Gi of the South's joint chiefs of staff said.
South Korean troops suffered no casualties but it was not known whether any of the North Koreans were hurt, Lee told a media briefing.
South Korean military officials said the shooting may have erupted by accident.
But Lee did not rule out the possibility that it could have been intended to further draw attention to nuclear crisis that began last October.
"We do not rule out an intentional provocation related to the international situation surrounding North Korea's nuclear problem," he said.
North Korean troops fired four rounds from a machine gun at 21.10 GMT on Wednesday while South Korean soldiers hit back with 17 rounds from an M-60 machine gun, Lee said.
Three rounds hit the South Korean guard post, about 1,100 meters from the North Korean post in the central portion of the 2.5-mile wide Demilitarized Zone.
The shooting took place as diplomatic efforts to resolve the nuclear crisis appeared to be making progress.
US and South Korean officials said the North might return to talks, as China seeks to engage the Stalinist country in multilateral talks demanded by the United States.
Pyongyang has previously insisted on bilateral talks with Washington.
The shootout near Yoncheon, some 35 miles northeast of Seoul, was the first land skirmish since November 27, 2001 when troops briefly exchanged fire.
The demilitarised zone is the world's most heavily fortified Cold War frontier and has remained a dangerous military flashpoint, manned by more than one million troops from both sides.
As the nuclear crisis deepens, US and South Korean officials have voiced fears that a minor incident at the tense border could trigger a chain of events leading to war.
South Korean warships twice fired warning shots last month on North Korean fishing boats that violated the Northern Limit Line, a de-facto sea border the North has never recognized.
A naval skirmish on June 29, 2002 left six South Korean soldiers dead. An in June 1999, a similar skirmish killed dozens of North Korean sailors.
North Korea has ratcheted up the nuclear stand-off by informing the United States last week that it had completed reprocessing 8,000 spent fuel rods to extract plutonium for nuclear weapons. Washington has expressed "serious concern" over the claim.