WASHINGTON (Reuters) - Patrick Shanahan was thrust into the spotlight during his debut as acting U.S. defense secretary on Wednesday, sitting next to President Donald Trump as he publicly disparaged Shanahan’s predecessor, lampooned the war in Afghanistan and called Syria a land of “sand” and “death.”

The former deputy defense secretary officially took office during the New Year’s holiday on Tuesday, issuing a statement saying that he looked “forward to working with President Trump to carry out his vision.”

Trump’s vision for the second half of his four-year term in office came into view on Wednesday as he spoke exhaustively during a cabinet meeting about America’s wars, and his displeasure with them.

Shanahan, a former Boeing executive, sat silently at Trump’s side, often expressionless, as television cameras rolled.

Trump suggested that former Defense Secretary Jim Mattis - who abruptly resigned last month over policy differences with Trump - had been essentially fired and that Mattis had failed in Afghanistan, where Taliban insurgents are becoming increasingly confident of ending the 17-year-old war on terms favorable to them.

“I’m not happy with what he’s done in Afghanistan and I shouldn’t be happy,” Trump said.

The remarks put Shanahan in a difficult position from the start of what could be a long tenure at the Pentagon, where many staff were loyal to Mattis.

Trump has suggested Shanahan could be acting as defense secretary for an extended period of time. Several candidates previously seen as potential successors to Mattis have recently indicated they don’t want the job, officials say.

Mattis’ public resignation could also make Senate confirmation perilous for any hand-picked successor.

Mattis implicitly criticized Trump in his resignation letter for failing to value allies who fight alongside the United States, including in places like Syria.

Even Shanahan had been picked by Mattis for the deputy job and held him in high regard, officials say. As deputy, Shanahan often had to fill in for Mattis in meetings, including those with cabinet members.

U.S. President Donald Trump (L) listens next to Acting U.S. Defense Secretary Patrick Shanahan during a Cabinet meeting on day 12 of the partial U.S. government shutdown at the White House in Washington, U.S., January 2, 2019. REUTERS/Jim Young

One reason Mattis resigned was Trump’s surprise decision to order the withdrawal of U.S. forces from Syria. Although Trump has declared victory there, critics warn Islamic State still has a toehold, and could stage a comeback if U.S. forces depart.

Trump said during the cabinet meeting that Islamic State militants should be combated by nations in the region, including U.S. adversary Iran.

“It’s sand and it’s death,” he said.

Shanahan has yet to detail his thoughts on the way forward in Syria, where the Pentagon plans a gradual withdrawal of U.S. troops over the coming months. He has also not commented on planning for a dramatic drawdown in Afghanistan.

Seth Jones at the Center for Strategic and International Studies think-tank in Washington said Shanahan started the job from a somewhat weaker position, as he did not have the mandate of having been confirmed by the Senate.

“Second, the president has made major decisions on a range of these (national security) issues,” Jones said.

CHINA, CHINA, CHINA

In one of his first meetings of the day, Shanahan told civilian leaders of the U.S. military to focus on “China, China, China,” even as America fights militants in Syria and Afghanistan, a U.S. defense official said.

The U.S. official, who spoke on condition of anonymity, did not elaborate on Shanahan’s views on China or other guidance he gave.

Other officials have described Shanahan as an advocate of the Pentagon's toughening stance toward Beijing. The 2018 National Defense Strategy here, which Shanahan helped develop, branded China as a strategic competitor.

“While we’re focused on ongoing operations, acting Secretary Shanahan told the team to remember China, China, China,” the official said.

Relations between the world’s two largest economies have plumbed new depths under Trump, with a trade war and disagreements over Taiwan and the South China Sea.

In Beijing on Thursday, a foreign ministry spokesman said China valued relations between the militaries of the two countries.

“If what we mutually seek is a partner, then we will likely get a partner. If what we seek is an adversary, then we will certainly get an adversary,” Lu Kang told a regular news briefing, when asked about Shanahan’s remarks.

Shanahan, best known for his focus on internal Pentagon reform and his private-sector experience, had spent three decades at Boeing and was general manager for the 787 Dreamliner passenger jet before he joined the Pentagon.

During Shanahan’s tense Senate confirmation hearing in 2017, the committee’s then-chairman, John McCain, voiced deep concern about giving the deputy job to an executive from one of the five corporations accounting for the lion’s share of U.S. defense spending.

“I have to have confidence that the fox is not going to be put back into the henhouse,” said McCain, who died in August.

Shanahan has recused himself from participating in Boeing-related issues, a spokesman said.