China and the United States have agreed to establish a military hotline, in an effort to ease tensions between them.
Mr Gates says he discussed Iran's nuclear ambitions with Mr Cao
US Defence Secretary Robert Gates and his Chinese counterpart Cao Gangchuan made the announcement at a joint news conference after talks in Beijing.
It is the first time China has agreed to such a link between its defence ministry and that of another country.
Mr Gates, on a two-day visit, said he had urged Mr Cao to be more open about his China's military build-up.
He also called for Beijing to step up its role in international diplomacy, saying he had raised issues such as North Korea, Iran and Sudan in his talks with Mr Cao.
"China's increasing political and economic stature calls for this country to take on a greater share of responsibility for the health and success of the international system," he told reporters.
The US and China have a long history of difficult relations in the military sphere.
One low point was in 2001, when a Chinese fighter jet crashed into a US spy plane over the South China Sea.
Relations have slowly improved since then, and the BBC's Dan Griffiths in Beijing says the proposed military hotline is the latest sign that the situation is getting better.
Both the US and China say they want to improve military links, but our correspondent says it will not be easy to overcome years of mutual suspicion and distrust.