U.S. Secretary of Defense Jim Mattis, center, is greeted by U.S. Ambassador Douglas Silliman as he arrives at Baghdad International Airport on an unannounced trip Monday, Feb. 20, 2017. Mattis said Monday 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. (AP Photo/Lolita Baldor)
U.S. Secretary of Defense Jim Mattis, center, is greeted by U.S. Ambassador Douglas Silliman as he arrives at Baghdad International Airport on an unannounced trip Monday, Feb. 20, 2017. Mattis said Monday 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. (AP Photo/Lolita Baldor) Credit: Lolita Baldor

BAGHDAD — U.S. military advisers are now fighting alongside Iraqi forces near the front lines against the Islamic State, a sign of President Donald Trump’s willingness to grant more latitude to American commanders than they’ve had since Iraq’s ground war against the militants was launched more than two years ago.

The Trump administration has not yet granted new authorities, but has loosened the reins for U.S. generals running the war, allowing hundreds of U.S. troops to join advancing Iraqi forces as they embark on their most complex mission to date: liberating Mosul, their second-largest city.

Allowing U.S. forces to head to the leading edge of the battle was almost unthinkable under the Obama administration, which was reluctant to be seen as putting American lives in harm’s way in a foreign war.

In recent weeks, however, about 450 U.S. special forces and spotters have embedded with the Iraqis to direct airstrikes against Islamic State positions and advise Iraqi ground commanders on how best to advance on the battlefield as they move to free western Mosul, said Lt. Gen. Stephen Townsend, commander of U.S. forces in Iraq and Syria.

“It is true that we are operating closer and deeper into Iraqi formations,” he told reporters at a military outpost at Baghdad International Airport. “We adjusted our posture during the east Mosul fight, and we embedded advisers a bit farther down into the formation.”

Townsend made the disclosure during James N. Mattis’ first visit to the Iraqi capital as secretary of defense. Mattis plans to submit a more aggressive battle plan to defeat the Islamic State to the White House by month’s end, and he hinted a willingness to grant more leeway to U.S. officers overseeing the war.

“We’ll accommodate any requests from the field commanders,” he said. “Right now, our allies _ as you can tell from the casualty lists _ are carrying the overwhelming burden of this fight in their own territory.”

The authority to put U.S. forces near combat lines, rather than back at headquarters, was quietly granted in November under former President Barack Obama in his last days of office.

It wasn’t clear why Obama granted the authority, but U.S. generals running the fight against the Islamic State appear to be embracing newfound freedom under Trump to make full use of it.

Additionally, Trump ordered Mattis to devise a new battle plan to defeat the Islamic State. It’s due at the end of the month.

The Pentagon didn’t publicly announce the change in protocol, but it became apparent Sunday after scores of uniformed U.S. soldiers were seen fighting shoulder-to-shoulder with Iraqi forces in the assault on western Mosul, the Islamic State’s last major stronghold in the country.

U.S. forces now go “as close as they need to get,” said Col. John Dorrian, a spokesman for the campaign against the Islamic State.

Iraqi Prime Minister Haider al-Abadi announced the much-anticipated assault early Sunday morning, and by nightfall roughly five square miles had been recaptured on the southern outskirts of the western bank of the Tigris River.

Iraqi forces pressed their attack Monday, getting to within striking distance of the city’s southern entrance on the second day of their offensive.

Iraq’s official combat media said units from the Federal Police and its special forces arm, the Emergency Response Division, had wrested control of Albu Seif, the last Islamic State-held area before the city. The latest push brings the troops within striking distance of Mosul’s airport at the southern edge of the city.

A second prong of the attack cleared a stretch of the Baghdad-Mosul highway leading into the city, further tightening a weekslong blockade on the western half of Mosul.

Mosul, which is bisected by the Tigris River, was seized by a skeleton force of Islamic State militants who swatted away a government force of some 20,000 men in the summer of 2014. It became the extremist group’s Iraqi capital: Abu Bakr Baghdadi, the group’s leader, announced the creation of a “caliphate” in a mosque in western Mosul’s Old City.

Since then, security forces have been eager at a chance for redemption. They got it in October, when the government, backed by the U.S.-led coalition, began its campaign, taking the city’s eastern bank after 100 days of fighting so intense that it forced the government to halt its campaign.

On Monday afternoon, convoys comprising dozens of Humvees, mine-protected vehicles and construction trucks from the Iraqi Counter-Terrorism Service were gathering near the village of Athbah, six miles from the city.

The Counter-Terrorism Service, an elite U.S.-trained group that specializes in urban warfare, has led the charge against every Islamic State bastion, including eastern Mosul. It will face a potentially more difficult job in the city’s western districts, home to an estimated 750,000-800,000 people packed in a more densely populated area.

Iraqi officials say the terrain of west Mosul makes clear the need for U.S. military advisors to work alongside and help direct precision airstrikes. The ancient city is densely populated with narrow streets, alleyways and close-built communities. One miscalculation could lay generations of antiquities to waste.

Sabeh Noman, spokesman for the Iraqi military’s elite Counterterrorism Services, said there is little room for error. Combat vehicles are too wide to navigate through many streets, so the Iraqis will be locked in house-to-house urban combat.

“They are giving the correct grades for an airstrike on the target without any mistake,” he said.