Does publicly announcing an impending military offensive expose assaulting troops to dangers that could be avoided if plans to invade were kept quiet? During all three presidential debates, Republican nominee Donald Trump has asserted that the Obama administration was “stupid” for publicly discussing the impeding joint U.S/Iraqi offensive against ISIL in Mosul, claiming that Hillary Clinton was “telling the enemy everything [she] want[s] to do” and asking “why not a sneak attack?” A week ago, he tweeted:

The attack on Mosul is turning out to be a total disaster. We gave them months of notice. U.S. is looking so dumb. VOTE TRUMP and WIN AGAIN! — Donald J. Trump (@realDonaldTrump) October 23, 2016

With the recent slate of successful high-profile covert operations against terrorists and the widespread use of drone strikes to eliminate non-state actors around the globe, on the surface Trump’s critique seems a reasonable question. However, the idea that the United States could conduct a sneak attack against an entrenched ISIL in a city the size of Mosul does not take into account either the logistical realities of major battlefield offensives or the strategic benefits of advertising such an operation beforehand. With the high-profile assault underway against an estimated 5,000 jihadist fighters, it is worth examining in depth the reasons why advertising a major military offensive on an urban target would be in the interest of the assaulting forces. History is instructive here: A review of the battles for Fallujah in 2004 reveals that taking the time to publicly announce and prepare for an assault of this nature can play a critical role in ensuring success on the battlefield.

Credible analysts agree that even if administration officials and military commanders had stayed silent about the buildup to the offensive in Mosul, ISIL would have been able to easily discover the intentions of U.S. and Iraqi forces. The logistics of a major offensive like the assault on Mosul meant that any military actions to prepare for an offensive, even when not publicly advertised, would be easily noticed by ISIL actors. This is not a quick operation on a single high-value target like the Bin Laden raid. It is more like the assault on Berlin at the end of World War II, the Battle for Hue in Vietnam, and the Second Battle of Fallujah during the Iraq War. It required a major military buildup that involves moving thousands of troops, armored vehicles, combat air support, and encircling the city to ensure no one escapes. These kind of massive movements do not go unnoticed by enemy scouts and intelligence. Whether the United States publicly discussed the assault or not, ISIL would be well aware that a major offensive was coming.

Further, there are strategic benefits to publicly announcing a planned offensive. The first and foremost benefit is giving civilians notice that they should evacuate the city if they are able. In addition to reducing the chances of causing a humanitarian crisis, launching an offensive without having to worry about extensive collateral damage from the fighting gives soldiers a much broader range of choices in tactics. With fewer civilians in harm’s way, commanders are able to loosen the rules of engagement, saving both friendly and civilian lives because soldiers are not required to constantly assess whether a person is a threat. Prolonged build-ups additionally allow commanders to mass overwhelming force, resulting in a fighting force capable of overwhelming insurgents, thereby reducing risk to soldiers on the ground. Public preparations also allow offensive forces to shape the battlefield by conducting what is called “stage zero” or “shaping” operations, which provide valuable intelligence for the upcoming assault by identifying enemy strongholds. This allows friendly forces to concentrate indirect fires and air support on specific areas, resulting in a more effective, efficient, and precise assault.

Public preparations for an upcoming assault also hurt enemy morale and information operations. Without advanced knowledge of an assault, there would be far fewer Western journalists covering the city, creating a vacuum where enemy propaganda machines could broadcast false claims of U.S. and Iraqi forces committing atrocities – a sensitive issue especially given the participation of the often controversial, Shia-majority Popular Mobilization Forces. Announcements and build-ups, therefore, ensure that the media presence around offensive forces is neutral and able to combat enemy information operations that could derail military operations politically. Finally, large, public buildups of forces create a psychological sense of impending dread in the enemy: Sustained vigilance without knowing exactly when and assault will occur or from where results in an enemy that is fatigued and overtaxed before a single shot is fired.

Historically, we can see the important impact that months-long planning and public preparation can have on the success of military operations with a side-by-side comparison of one of the most well-known urban assaults from the Iraq War: the battles for Fallujah. Critically, in contrast to the first April 2004 assault that was prematurely halted due to humanitarian and political concerns, the success of the Marine and Army units that swept through the city during Operation Phantom Fury in November 2004 can be directly traced to the steps they took to prepare the battlefield beforehand.

The first Battle of Fallujah was the U.S. reaction to the murder and mutilation of four American Blackwater contractors who were ambushed by Iraqi insurgents on March 31, 2004. Just days after the horrific event sparked outrage amongst the American public, the White House ordered Marine units to carry out an assault on the violence-plagued city and remove insurgents. With just days to plan the assault, the marines had no time to give civilians inside Fallujah any prior warning about the offensive. While the administration had promised an “overwhelming” response to the attacks, insurgents had little time to prepare and no indication as to when or where the assault would occur. The Marines also did not have the time to mass forces (achieving a trade-off to preserve the element of surprise) and so were forced to use just two battalions (with two in reserve) to attack a city the size of St. Louis, Missouri. And without the ability to conduct a thorough intelligence preparation of the battlefield and shaping activities beforehand, such as reconnaissance by fire, battalions from the 1st Marine Division assaulted Fallujah essentially blind to insurgent strongholds and enemy capabilities, putting them at increased risk.

When marines assaulted the city beginning on April 5, there were reports of large numbers of civilian casualties and a great deal of collateral damage, sparking international and domestic outcry against the U.S. response and put pressure on the administration to halt the offensive. As a consequence of the short notice, there were very few Western journalists in the area to cover the offensive. Al Jazeera and Al Arabiya streamed insurgent propaganda across the Middle East, reporting false stories of U.S. troops murdering families and children. The stations’ graphic images significantly damaged U.S. credibility throughout the region and resulted in uprisings across Iraq against U.S. operations. In the end, just four days after the assault began, the administration was forced to bow to the pressure and order a withdrawal despite having achieved significant battlefield gains at great cost. By the time that U.S. forces completely withdrew on April 30, approximately 600 civilians and 27 soldiers had lost their lives.

By contrast, the Second Battle of Fallujah began after months of warning, preparation, and waiting. Much like the coalition forces in Mosul today, the United States massed its troops, prepared the battlefield, and was ultimately successful (at least in the short-term) in driving the insurgents out of the city. U.S. commanders called for additional armored support, ultimately massing over a division of combat power to assault the city over a period of three weeks. During the preparations, they dropped leaflets and issued loudspeaker warnings about the impending offensive, encouraging civilians to evacuate or else risk being caught in the crossfire. Even Secretary of Defense Donald Rumsfeld encouraged civilians to leave in the buildup to the assault, publicly stating to the Arab press that there would be no cease-fire.

By the time the battle commenced on November 7, some estimates suggested that 90 percent of the city had been evacuated, resulting in favorable rules of engagement for the assaulting soldiers and marines that greatly reduced the risks they were exposed to when conducting house-to-house clearing operations. They encouraged reporters to embed with units and cover the offensive in order to counter enemy propaganda. Weeks before the assault, Marine units established checkpoints to control the flow of people, encircling the city and building a berm that was up to 12 feet tall in some places to stop insurgents from escaping en masse. They were able to conduct shaping operations before the attack, identifying key sections of the city where the fighting would be heaviest and concentrating indirect fires into insurgent-ridden neighborhoods. During two months of fighting, U.S. and coalition forces killed or captured almost 3,000 insurgents at a cost of 107 coalition forces killed in action.

Massing forces, evacuating civilians, and preparing the battlefield were critical to the success of the second Fallujah operation, and could have only been carried out by advertising the impending assault and actively preparing the battlefield in advance. In the end, U.S. forces in Anbar province won a large battle against the insurgents in Fallujah, not in small part because of the actions they were able to take as a result of the announced impending battle.

It is certainly true that all of this time did allow insurgents to prepare for Operation Phantom Fury. They built booby traps, laid IEDs and reinforced their own fighters. But U.S. forces were able to counter those preparations, using mine-clearing devices to detonate planted IEDs, indirect fires to flush out hidden enemy fighters, and armored units to secure vulnerable supply routes. In contrast to Trump’s concerns that fighters will flee if given advanced warning, in Fallujah the expectation of a battle in fact attracted more fighters who needed to publicly show that they could stand up to American forces, and forces in the city nearly doubled over the summer.

All current accounts suggest that ISIL is behaving the same way today in Mosul. ISIL is waging a public relations battle in addition to a real-world fight and needs to be able to show its recruits that it can stand against U.S. and Iraqi forces. Because the United States has publicly committed to taking Mosul, it must devote already scarce resources to a conventional fight it cannot win.

Make no mistake – the public discussion about the impending assault on Mosul is no accident and offers strategic benefits for U.S. and Iraqi forces. Trump is wrong to suggest otherwise, and his statements reflect profound ignorance about military operations, wartime strategy, and the responsibilities of being commander-in-chief. With a U.S. death already reported, Mosul will continue to be a hard-fought, dangerous urban battle. However, the administration and strategists inside the Pentagon will also have done everything they can to give the soldiers on the ground every advantage possible.

Carrie A Lee is a postdoctoral fellow for Innovative Approaches to Grand Strategy at the University Notre Dame International Security Center. Her award-winning dissertation, The Politics of Military Operations, explores how electoral politics influence military operations on the battlefield. She holds a PhD from Stanford University and a SB from MIT.