Oil rig China
Ships of the Chinese Coast Guard are seen near Chinese oil rig Haiyang Shi You 981 in the South China Sea, about 210 km (130 miles) off shore of Vietnam on May 14, 2014. Reuters/Nguyen Minh

China’s Premier Li Keqiang and his Vietnamese counterpart, Nguyen Tan Dung, agreed Friday on cooperation and bilateral talks to discuss the ongoing tensions over maritime disputes in the energy-rich waters of the South China Sea. The agreement is a step away from a tense climate that recently reignited animosity between the two countries, which fought a war in 1979.

The two officials met at the Asia-Europe Meeting in Milan, Italy. China’s state-run Xinhua News Agency reported that the two sides will “properly deal with bilateral maritime differneces and keep bilateral ties on the right track.”

Sino-Vietnamese relations were derailed earlier this summer when the positioning of a Chinese oil rig within what Vietnam considers its exclusive economic zone sparked anti-Chinese violence and episodes of xenophobia.

Scores of Chinese and Chinese-looking residents left Vietnam in an exodus after a violent confrontation between Chinese and Vietnamese factory workers over the newly erected rig prompted a series of protests. During the protests the violence only escalated, with at least two Chinese killed and around 90 people injured. The situation was only exacerbated when China’s notoriously hawkish newspaper Global Times called for “non-peaceful” measures against countries embroiled in regional territorial disputes with China.

Now, the two significant economic partners are working to overcome the violence, even if the territorial dispute remains at a stalemate. “Thanks to efforts from both sides, China-Vietnam relations have ridden out the recent rough patch and gradually recovered,” Li said during the meeting.

The two governments hope to further cooperation in infrastructure, finance and maritime exploration.