WASHINGTON - James Mattis, President-elect Donald Trump’s pick for US defense secretary, Thursday accused Russia of trying to break up NATO and said China was destroying trust with its neighbors.

Asked during a confirmation hearing how he viewed the strains facing the post-war world order, Mattis replied: “I think it’s under the biggest attack since World War II sir, and that’s from Russia, from terrorist groups and with what China is doing in the South China Sea.”

“Russia is raising grave concerns on several fronts and China is shredding trust along its periphery,” Mattis told the Senate Armed Services Committee.

China’s military build-up in the South China Sea has raised tensions with regional neighbors and with the United States, and US lawmakers are alarmed by Putin’s military actions in Syria, Crimea and elsewhere.

“Right now, the most important thing is that we recognize the reality of what we deal with with Mr Putin, and we recognize that he is trying to break the North Atlantic alliance,” Mattis said.

His stance on Russia stands in contrast to that of Trump, who has repeatedly praised Putin’s leadership qualities and advocated closer ties with Moscow.

“History is not a straightjacket... but we have a long list of times that we have tried to engage positively with Russia; we have a relatively short list of successes in that regard,” Mattis said.

With regard to China, Mattis elaborated in written testimony that the United States must try to engage and collaborate with China where possible, “but also be prepared to confront inappropriate behavior if China chooses to act contrary to our interests.”

A colorful commander famed for his pugnacious aphorisms, Mattis earned the nickname “Mad Dog” with his battle-hardened swagger and the sort of blunt language Marines are famous for.

He has been quoted as saying, “Be polite, be professional, but have a plan to kill everyone you meet.”

The tough-talking warfighter is popular among politicians and troops alike, but his nomination raised some eyebrows because he only hung up his uniform in 2013.

Senators were expected to probe Mattis, a retired Marine Corps general on the importance of civilian control of the military.

- Civilian control -

A cornerstone of US democracy is that civilians, not troops, must have control of the military, and the commander-in-chief is the president. US law prohibits officers from serving as defense secretary for seven years after leaving active duty.

The 66-year-old Washington state native is expected to receive a special congressional waiver to serve in the post - only granted once before, for the famous World War II General George Marshall who served under President Harry Truman from 1950-1951.

“Civilian control of the military is a fundamental tenet of the American military tradition,” Mattis said. “It is a hallmark of America’s military that service members take pride in our country’s adherence to that principle.”

US politicians have lauded Mattis, and the granting of his waiver appears to be a formality. Senior Republican lawmaker Senator John McCain, who heads the Senate Armed Services Committee, said he “could not be happier” about Mattis’s nomination. “Current law would bar him from serving as secretary of defense for three more years,” McCain said.

“While I support retaining that law, I also believe that our nation needs General Mattis’s service more than ever.”

Mattis would replace technocrat Ashton Carter, President Barack Obama’s fourth Pentagon chief .

Senators were also expected to grill Mattis over a slew of security issues, including North Korea’s nuclear ambitions, the fight against the Islamic State group and budget constraints.

Trump has said his administration “will begin a major national effort to rebuild our badly depleted military.”

He wants more ships, troops, planes and weaponry.