One of China’s top generals said Monday that it was up to the United States to change its policies if it wants better ties with China’s military, and he offered a lukewarm endorsement of U.S. programs designed to bring the two sides closer together.

Chinese Minister of Defense Liang Guanglie made the comments after two hours of talks with U.S. Secretary of Defense Robert M. Gates, who is on his first trip to China since 2007. Gates is on a mission to restore high-level military contacts with the People’s Liberation Army after Beijing’s decision to cut those ties a year ago, when the United States announced a $6.4 billion arms sale to Taiwan.

Liang also denied that China’s military modernization — and its development of systems such as an aircraft-carrier-killing ballistic missile, anti-satellite weapons and a new stealth fighter — posed a threat to the United States.

“We cannot call ourselves an advanced military country,” Liang told reporters. “The gap between us and advanced countries is at least two to three decades.”

Liang reacted tepidly to Gates’s proposal that the U.S. and Chinese militaries engage in a wide-ranging strategic dialogue on nuclear posture, cyberwarfare and North Korea, saying the PLA was “studying it.”

He did announce that one of China’s most senior generals, Chen Bingde, the chief of the PLA’s general staff, would travel to the United States during the first half of this year. But, contrary to the wishes of Liang’s American counterparts, he did not specify a date for the trip.

Liang also reiterated the PLA’s commitment to pursuing joint work with the U.S. military on counterterrorism, counterpiracy, humanitarian assistance and disaster relief. But those issues had been agreed upon already during the last high-level meeting between the two sides in October 2009.

Despite Liang’s responses, Gates — who has dealt with China for decades and, as a senior CIA official, was one of the architects of an earlier, very productive intelligence relationship with Beijing — pronounced himself pleased with the talks.

“I am confident,” Gates said, “that we are on the road to fulfilling the mandate that our two presidents have given us to strengthen the military-to-military relationship.”

Asked whether he had changed his position that the PLA was the main impediment to better military ties, Gates said he was “optimistic” that the PLA “is as committed to fulfilling the mandate of our two presidents as I am.”

Liang’s lukewarm reaction to Gates’s proposals reflects a continued uncertainty within the PLA about whether to embrace better ties with the United States; it also underscores the sense that the PLA was strong-armed by China’s political leadership into welcoming Gates on this trip.

Gates was rebuffed by the PLA in June when he tried to come to Beijing.

But Chinese President Hu Jintao travels to Washington next week for his second — and probably last — summit with President Obama and, as part of his legacy, needs to have military ties restored. Hu is expected to step down in 2012, making way for a new generation of leaders.

Gates and others in the U.S. government have long argued that the United States and China need to improve military ties in order to lessen the possibility that miscalculation or misunderstanding could lead to war.

The Obama administration got a taste of the potential dangers less than two months after coming into office when Chinese merchant ships menaced and then narrowly missed ramming a U.S. Navy reconnaissance vessel in international waters off China’s southern coast.

For years, U.S. officials also have sought talks with China’s military on its nuclear weapons and other sensitive issues, including contingencies on the Korean Peninsula.

For example, should the North Korean government collapse, U.S. officials have argued, it would be critical for Washington and Beijing to understand each other as U.S. troops moved north or China’s soldiers moved south. To this end, Gates will visit the headquarters of China’s strategic rocket forces, called the 2nd Artillery, on Wednesday as part of his ongoing efforts to persuade China to engage in talks.

But the PLA seems conflicted about such a dialogue and has chosen twice over the past three years — in 2008 and 2010 — to suspend military ties after Washington announced arms sales to Taiwan.

When it broke ties the second time last January, the PLA laid out three conditions that Washington had to fulfill if it wanted the suspension lifted. The United States, it said, had to stop weapons sales to Taiwan, end its naval and air-based surveillance activities off China’s coast and do away with laws and regulations that restrict U.S. interaction with China’s military.

Washington has done none of the above, but thanks to Hu’s political exigencies, ties have been restored anyway. Still, Liang put the onus on the Pentagon if it wants further progress. And he refused to rule out additional suspensions if Washington sells another batch of weapons to Taiwan.

“We hope,” Liang said, “that the U.S. side will pay sufficient attention to the concerns of the Chinese side and take measure to gradually remove or reduce obstacles that stand in the way of our military-military relations.”