Updated

After three years of being told they could not go to the front lines, U.S. troops advising Iraqi forces as they evict ISIS from Mosul no longer face those tight restrictions, according to the top U.S. commander in Iraq, Lt. Gen. Stephen Townsend, as the new defense secretary stood by his side in Baghdad.

"It is true that we are operating closer and deeper into the Iraqi formation," Townsend told reporters travelling with Secretary of Defense Jim Mattis. "We adjusted our posture during the east Mosul fight and embedded advisers a bit further down into the formation."

MATTIS REBUFFS RUSSIAN COOPERATION CALL

Townsend, who began his career in Baghdad as a Colonel leading a Struyker brigade during the surge in 2007, commands more than 6,000 U.S. troops in Iraq and Syria.

"I have all the authorities I need to prosecute our fight and I am confident that if I were to need more that my leadership would provide those," Townsend said.

Mattis, a former Marine four-star general who served several tours in Iraq, is on his first visit to Iraq in his new civilian role. He is tasked with presenting President Trump a new plan to defeat ISIS -- a plan due on Feb. 27. Mattis suggested the former restrictions could be further loosened as he weighs whether to send more troops, and the Coalition prepares to expand the fight to Raqqa, the ISIS capital in Syria.

"We owe some degree of confidentiality so we don't expose to the enemy what we have in mind as to the timing of operations," Mattis said.

Call it the Trump effect, but U.S. commanders began loosening the restrictions on forward deployed troops back in November as Iraqi forces pushed into Mosul, a tough fight that began in October and is now entering a second phase in western Mosul. When the U.S. military returned to Iraq three years ago, the Obama administration refused to say U.S. troops were in combat or refer to them as "boots on the ground." The White House refused to allow these "advisers" to go to the front lines.

On the campaign trail Trump said if he were commander in chief he would loosen the overly restrictive rules of engagement.

"I would knock the hell out of ISIS...[and] when you get these terrorists, you have to take out their families," Trump said on "Fox & Friends" in December 2015.

The western Mosul operation was launched by the Iraqi Prime Minister just one day before Mattis arrived in Baghdad, a move welcomed by U.S. commanders and the new defense secretary.

"The Iraqi army has fought very well, they've lost troops and kept fighting, they've been very brave," Mattis said while meeting Iraq's defense minister. "And I'm just here to tell the minister that I admire what his troops are continuing to do today in west Mosul."

Townsend added: "If you look back a little over two years ago, this army was broken and defeated, barely able to hold their capital. This army has done this remarkable turnaround in just two years. It is an incredible turn around. They've liberated half their lost territory. They are about to liberate their second largest city center held by ISIS. Iraqi security forces are going to take that city back. No doubt about it."

Asked whether he thought U.S. troops will be asked to leave Iraq after the military clears Mosul of ISIS fighters, the top U.S. commander and the defense secretary said U.S. troops will be in Iraq for some time.

"I don't anticipate that we'll be asked to leave by the government of Iraq after Mosul," Townsend said. "The government recognizes this is a complex fight. I wouldn't want to put a timeline on it."

Mattis added: "This is a partnership. There have been a lot of rocky times out here. I imagine we'll be in this fight for a while and we'll stand by each other."

Radical Shia cleric Moqtada Al Sadr has called for U.S. troops to leave Iraq in the wake of the White House's proposed travel ban temporarily halting visas for Iraqis and repeated threats from President Trump that he would have taken Iraqi oil to pay for the war, an idea Mattis squashed before landing in Baghdad.

Said Mattis: "We're not in Iraq to seize anyone's oil."