President Donald Trump’s trip to Iraq this week, his first to a war zone as president, was supposed to be a surprise. But the White House couldn’t keep the sensitive trip a secret for long.

After tweeting more than three dozen times over the last four days, Trump ceased his rapid-fire online missives on Tuesday night. By Wednesday, the president was nowhere to be found, without any scheduled public events. There was no uniformed Marine standing outside the West Wing, normally an obvious signal that the president is in the Oval Office. White House officials went silent. Soon, amateur aircraft watchers were tracking a Boeing VC-25, the military plane that serves as Air Force One, flying over Europe.

It wasn't the first time aviation obsessives had flagged possible signals that a president might be headed to a war zone. But the real-time tracking of Trump’s flight, paired with Trump’s Twitter disappearing act offered the strongest hint yet that he was finally making the trip.

Past administrations have taken extreme measures to keep presidential trips to war zones secret, fearing serious security risks if they’re made public. Journalists traveling on the trips must agree to strict embargoes barring them from reporting anything until the president is out of harm’s way. Often, the trips are so hush-hush that reporters are only allowed to tell their spouse and one editor that they are on the way to a war zone, where they sometimes have to rely on satellite phones to relay the news back to Washington.

But the age of secret presidential jet-setting is rapidly coming to an end, as amateur flight trackers send news of unidentified military aircraft crisscrossing the globe in real time via Twitter.

And while the White House prevented major news outlets from publishing stories about the trip before they made an official announcement, it couldn't stop rampant online speculation.

The fanatic community of flight trackers were the first to report that Trump appeared to have taken off from Joint Base Andrews around midnight on Christmas on a Boeing VC-25A, one of the modified Boeing 747s that serves as Air Force One. The plane was not using the traditional Air Force One call sign, but was instead dubbed RCH358. "Reach" is a call sign often used by military cargo planes.

An aircraft spotter in the United Kingdom identified the trademark 747 Wednesday morning, and snapped a photo. CivMilAir, a Twitter account that tracks military aircraft, retweeted the image, setting off a flurry of speculation among plane watchers worldwide.

Further complicating the efforts is a president who can’t seem to keep a secret. Trump has been broadcasting the possibility of an upcoming trip to a war zone for weeks, both in public and in private.

“No, I’m going to a war zone,” Trump shot back at a reporter last month when he was asked whether he was afraid to make such a trip. He told The Washington Post in a November interview that he would make the trip “at the right time,” perhaps even before Christmas.

According to a White House official, the Trump administration had been planning the trip for more than six weeks.

In an interview with journalists traveling with him in Iraq, the president signaled his frustration with the secrecy surrounding the excursion, adding that previous planned trips had been scuttled because word began leaking out.

Asked if he had concerns about making the trip, Trump said, “Sure. When I heard what you had to go through?”

He added, “I had concerns about the institution of the presidency. Not for myself personally. I had concerns for the First Lady, I will tell you."

Trump then described the security precautions Air Force One takes when landing in a war zone.

"If you would have see what we had to go through in the darkened plane with all windows closed with no light anywhere — pitch black," he said

The prospect of a surprise trip to Iraq or Afghanistan has kept the White House press corps on edge for weeks. At one point, rumors circulated that Trump had ditched reporters and departed for a war zone while he was alleged to be golfing at his Mar-a-Lago club over the Thanksgiving holiday. And there were whispers that the president was tacking on a covert trip to Iraq or Afghanistan on his return trip from the G-20 in Argentina. Both sets of rumors turned out to be false.

Despite all the rumors, the specifics of Trump’s trip were closely held.

The trip was kept off the White House’s official travel log, but by Wednesday afternoon, West Wing aides got word that the president was en route to an unknown destination and would not return to Washington until Friday, according to one of those aides.

The surprise trip occurred on the fifth day of a government shutdown, with several federal agencies shuttered and neither the president nor congressional Democrats have given any indication they are any closer to reaching a deal to reopening the government than when it began.

Ahead of then-President Barack Obama's surprise 2012 trip to Afghanistan, the White House actually released a fake public schedule packed with West Wing meetings to throw reporters off the trail. But that didn't stop an Afghan news station from reporting that Obama had arrived in Kabul, spurring a few U.S. new outlets to do quick write-ups on the trip. A Drudge banner blared "Where is Obama?"

The White House and U.S. embassy in the country quickly tried to kill the reports, denying that Obama was in Afghanistan. The U.S. news organizations that had picked up the Afghan news agreed to pull their pieces until the White House officially announced the trip.

BuzzFeed editor in chief Ben Smith, who had retweeted rumors of the news, even agreed to post a denial from the White House on Twitter.

He later explained: "Like most news organizations, we will typically defer to the White House's judgment on true security risks. In this case, we had no original reporting on the subject, and it didn't seem like right moment to have an abstract argument about the contemporary media ecosystem, though I think it's getting harder and harder to unring these bells."

Given the quick unveiling of Trump's Iraq trip on Wednesday, Smith's comments now seem prophetic.