South Korea's military cyber command, set up to guard against hacking, appears to have been breached by North Korea, the military has said.
A spokesman told the BBC that classified information was thought to have been stolen, although it is not clear exactly what data was accessed.
The North has previously been accused of hacking into banks and media outlets but never the South's military.
Pyongyang has in the past rejected allegations of cyber crime involvement.
"It seems the intranet server of the cyber command has been contaminated with malware. We found that some military documents, including confidential information, have been hacked," a military spokesman told South Korea's Yonhap news agency.
It is not clear whether low-grade documents or more important details like war plans were accessed.
The military said that the compromised section of its network was isolated once the attack was detected.
North Korea is believed to have thousands of personnel involved in cyberwarfare.
Since 2010 they have been focusing on application programming interfaces (APIs), which can be designed to attack national infrastructures, North Korean defector and computer science professor Kim Heung-Kwang told the BBC.
The North has a track record of alleged cyber attacks in recent years against South Korean government agencies, banks and media companies.
An apparent concerted campaign involving the planting of malicious code began in 2014, Reuters news agency quoted police as saying.
It was aimed at laying the groundwork for an attack on a massive scale, the agency said.
The campaign was discovered in February this year after defence-related material including blueprints for the wings of F-15 fighter jets was stolen.
Some 140,000 computers at 160 companies were attacked up until this June, according to police.