In just a few days, the two major-party presidential nominees will share a stage together and debate the issues facing the nation, as well as their own qualifications to lead the country. Thanks to the value of first impressions as well as expansion of early voting, this event will hold critical importance for the outcome of the election.

Can a neophyte politician like Donald Trump prevail mano a mano against an experienced pol like Hillary Clinton? Yes – but only with lots of discipline, and perhaps a little luck.

Related: How Hillary Can Win the First Debate

A race that looked all but over just a few weeks ago suddenly appears to be tied. Clinton dominated the polls in August, and dominated the airwaves, too, spending tens of millions of dollars on advertising while Trump’s campaign largely went dark. The Republican nominee seemed unable to let a favorable news cycle conclude without somehow stepping on a banana peel. At one point, polling analyst Nate Silver calculated Trump’s chances of winning the election at just under 11 percent.

Scant weeks later, that figure has risen to 43 percent as Trump’s support has risen sharply – and Clinton’s has declined almost as much. Trump has become more disciplined and tactical, while Clinton has stumbled from one misadventure to the next. She blew an obviously planned attack line, “basket of deplorables,” by applying it to a broad swath of the same electorate she hopes to win on Election Day.

Less than forty-eight hours later, Clinton collapsed at a 9/11 memorial event, raising questions about her health – and about her honesty. The campaign frittered hours away coming up with a variety of excuses about overheating and dehydration before finally admitting that Clinton had been diagnosed with pneumonia two days earlier.

The timing of these stumbles could not have been more fortuitous to Trump. Six weeks ago, The New York Times reminded readers at the nadir of Trump’s electoral fortunes that early voting shortened the time the Republican nominee had to right the ship. Thirty-five states allow some form of voting before Election Day in November, and a number of them begin much sooner than later. Two states, Minnesota and South Dakota, will open early voting on Friday, three days before the first debate, and others will be well under way before the second and third debates on October 9th and 19th.

Related: Trump Campaign Struggles to Refute Reports of Charity’s Self-Dealing

Trump has put himself back into contention just in time. Can he win the debate on Monday and vault into the lead?

That will be tougher than it looks, but not impossible. Trump managed to thrive in the Republican primary debates in large part because of the number of people on stage, and their reluctance to go directly after Trump until very late in the cycle. Trump could dominate early and then coast while the other candidates attacked each other in the bid to be the Trump alternative. That strategy won’t work when only one other candidate is on stage with him.

Trump will be helped by Clinton’s less-than-engaging stage presence. She has participated in a number of debates over the years, and produced very few memorable moments from them. Ciro Scotti advised Clinton to find her inner Ronald Reagan and adopt his manner to make a fool out of Trump, but she lacks the Gipper’s charisma and easy, self-deprecating sense of humor. (For that matter, so does Donald Trump.)

Her campaign has instead fallen into the same trap as many Republicans – focusing on how awful Trump is and making him anathema to voters. And it’s almost a sure bet that Clinton will adopt the same strategy in the debate. It didn’t work for Trump’s Republican opponents, and the polls show it hasn’t done much for Clinton so far either.

Related: The Battle of the Brands Isn’t Trump v. Clinton, It’s Trump v. Obama

In fact, this relentless focus on Trump’s personality offers him a solid path to winning the debate. Thanks to expectations set by the Clinton campaign, Trump can easily gain the advantage by adopting the stage presence of a thoughtful statesman. It sounds trite, but Clinton is so unliked and distrusted by voters that Trump could gain the edge just by making himself appear to be a rational alternative. That will take a lot of discipline for Trump to maintain, and no small amount of cramming on policy to at least sound schooled on the broad strokes, but it’s an achievable goal.

That just accounts for the defense in the debate. Trump likes to go on offense, sometimes so eager that he ends up damaging his own cause, but Clinton gives Trump plenty of targets on which to focus. She will undoubtedly emphasize her own experience and point to Trump’s own lack of preparation for the job.

Trump has to refocus that argument on the Clinton establishment and the corruption between the State Department and the Clinton Foundation – such as the discovery by the Washington Examiner that nearly 40 percent of State Department appointments to advisory boards went to foundation donors. Anti-establishment fervor drove the 2016 primary cycle and remains a potent force, and only Trump has an opening to define the election on those populist terms.

National security will play a big role in the debate, and that favors Clinton to some degree because of her four years as Secretary of State. Trump has openings there, too, especially when it comes to issues such as Libya and Egypt. Trump met with Egyptian president Abdel Fattah al-Sisi earlier this week, offering the firm friendship of the US in a Trump administration.

Related: In New Attack on Big Banks, Clinton Channels Sanders and Warren

Trump should use that to remind viewers of the Obama administration’s disastrous Arab Spring policies, which turned Libya into a failed state and nearly did the same thing to Egypt, or worse, leaving it in the hands of the Muslim Brotherhood, an organization that has spun off terrorists like Hamas and al-Qaeda’s Ayman al-Zawahiri. If Trump really finds his pace, he can challenge Hillary to name specific accomplishments from her tenure at State, especially in the realm of national security, as her surrogates continue to get stumped on that question.

All of this advice is predicated on Trump’s sense of discipline and preparation, and that’s based on his improved performance on the campaign trail since mid-August. Will he succeed in sticking to a strategy and win the debate? To parallel Silver, the Trump from six weeks ago might have had a one-in-ten shot, but the Trump – and Clinton – of late make it almost a 50:50 proposition.

If Trump can’t maintain discipline and focus, and especially if Clinton can make Trump look ridiculous or scary on stage, early voting might not allow him a second chance.