US Secretary of Defense Jim Mattis, on an unannounced visit to Iraq, said the United States does not intend to seize Iraqi oil, shifting away from an idea proposed by President Donald Trump that has rattled Iraq's leaders.

Mattis arrived in Baghdad on Tuesday, as the battle to oust the Islamic State of Iraq and the Levant (ISIL) group fighters from western Mosul moved into its second day, and as the Pentagon considers ways to accelerate the campaign against ISIL in Iraq and Syria.

Under the president's deadline, Mattis has just a week to send Trump a strategy to ramp up the fight and defeat ISIL.

And any plan is likely to depend on US and coalition troops working with and through the local forces in both countries.

READ MORE: Iraq - Trump's Muslim ban 'a matter of life and death'

"We're going to make certain that we've got good situational awareness of what we face as we work together and fight alongside each other," Mattis said.

His key goal during the visit is to speak about the military operations with political leaders and commanders on the ground, including his top commander in Iraq, Lieutenant-General Stephen Townsend.

Asked about the tensions, Mattis said he has been assured that the travel ban - which has been stalled by a legal challenge - would not affect Iraqis who have fought alongside US forces.

'Not here for oil'

Those efforts could be complicated by Trump's oil threat and his inclusion of Iraq in the administration's travel ban - twin blows that have roiled the nation and spurred local politicians to pressure Prime Minister Haider al-Abadi to reduce cooperation with Washington.

"I think all of us here in this room, all of us in America have generally paid for our gas and oil all along, and I'm sure that we will continue to do that in the future," Mattis told reporters travelling with him.

READ MORE: Battle for Mosul upends false Iraq narrative

"We're not in Iraq to seize anybody's oil."

His comments may provide some reassurance to the Iraqis. But the tensions come at a critical point in the war against ISIL, with two key battles in the works: the fight to take control of west Mosul, and the start of a campaign in Syria to oust ISIL from Raqqa, the capital of its self-declared caliphate.

Abadi has taken a measured approach, but the issues can roil already difficult internal politics.

Trump brought up the oil issue during the campaign, and he mentioned it again late last month during a visit to the CIA.

"To the victor belong the spoils," Trump told members of the intelligence community.

He said he first argued this case for "economic reasons", but added it made sense as a counterterrorism approach to defeating ISIL "because that's where they made their money in the first place".

"So, we should have kept the oil," he said. "But, OK, maybe you'll have another chance."

New plan to fight ISIL

Trump has signed an order on January 28 that gives Mattis and senior military leaders 30 days to come up with a new plan to beef up the fight.

Mattis would not discuss specifics, saying he wants to gather information first. But, he has been talking with military leaders about the possible options, and has largely supported the US strategy of fighting ISIL with and through local forces.

READ MORE: Battle for Mosul - 'I miss everything there'

The military options range from putting more troops in Iraq and Syria to boosting military aid to Kurdish fighters backed by the US-led coalition.

More specifically, officials have talked about expanding efforts to train, advise and enable local Iraqi and Syrian forces, increasing intelligence and surveillance, and allowing US troops to move forward more frequently with Iraqi soldiers nearer the frontlines.

There are more than 5,100 US forces in Iraq, and up to about 500 in Syria.