Vietnam and Australia agreed to closer security ties Wednesday, including training Vietnamese troops in Australia as Canberra seeks to balance its relationship with its biggest trading partner China and relations with other neighbors in the Asia-Pacific region.

Vietnamese Prime Minister Nguyen Tan Dung told reporters that his Australian counterpart Tony Abbott had agreed during a meeting at Parliament House to strengthen cooperation on security and defense in a range of areas, including experience and information sharing, English-language training and special forces cooperation.

"We agreed on the importance of the assurance of peace, stability, maritime security and freedom of navigation in the South China Sea, in compliance with international law," Dung said.

China says it has historical claims to a huge swath of the South Sea China that overlaps with the claims of several neighbors, including Vietnam, Malaysia, Taiwan and the Philippines, fueling concerns of a conflict.

Abbott said 120 Vietnamese military personnel would be trained in Australia and Vietnam would take part in joint military training exercises in Australia.

He acknowledged a growing security relationship between Australia and Vietnam in recent years. Australian troops fought alongside the U.S. against the Vietnam communists during the Vietnam war.

"We have both prospered in peace over the last 40 years because of the stability that our region has enjoyed and anything which disturbs that stability is something that we would mutually deplore and mutually work to ensure didn't happen," Abbott said.

"We both support freedom of navigation by air and by sea in the South China Sea. We both deplore any unilateral change to the status quo. We both think that disputes should be resolved peacefully and in accordance with international law," he said.