East of the KPA and ROK 8th Divisions, the KPA 12th Division crossed the Naktong River at Andong, moving through the mountains in small groups to reach P'ohang-dong. UN planners had not anticipated that the 12th Division would be able to cross the river effectively, and thus were unprepared. In the meantime, the ROK 3rd Division was heavily engaged with the KPA 5th Division along the coastal road to P'ohang-dong. The divisions' clashes centered on the town of Yongdok, with each side capturing and recapturing the town several times. On August 5, the KPA attacked, again taking the town from the ROK and pushing them south. On August 6, the ROK launched a counteroffensive to retake the town. However, KPA 5th Division forces were able to infiltrate the coastal road south of Yongdok at Hunghae. This effectively surrounded the ROK 3rd Division, trapping it several miles above P'ohang-dong. The KPA 766th Independent Regiment advanced around the ROK 3rd Division and took the area around P'ohang-dong.