As he began his fourth week in office Monday, President Donald Trump faced intense pressure to cut ties with his national security adviser, Michael Flynn, following reports that Flynn lied to top administration officials. Late Monday, Flynn resigned.

Sources familiar with the situation said the president’s staffers are now “trying to prepare options” ― including replacements.

Among the top contenders to replace Flynn is retired Gen. David Petraeus, according to current and former National Security Council staffers who requested anonymity in speaking to The Huffington Post. Petraeus, a former CIA director, led U.S. forces in Iraq and Afghanistan, and he is still widely respected in national security and intelligence circles. He’s due to meet with Trump this week at the White House, according to former NSC staffers.

Also being considered for the job are Vice Adm. Robert Harward, a former deputy to Defense Secretary James Mattis; Stephen Hadley, the former national security adviser to President George W. Bush; and retired Gen. Keith Kellogg Jr., who was National Security Council chief of staff until Monday night, when Trump promoted him to acting national security adviser.

More than any of the candidates, however, Petraeus has earned the trust and admiration of both the president and the broader political and military community. But there are still potential obstacles to Petraeus’ appointment.

In the spring of 2015, the general pleaded guilty to giving classified information to his biographer, Paula Broadwell, with whom he was having an extramarital affair. As part of the plea deal, Petraeus was placed on two years’ probation, set to expire within weeks. It is unclear whether Petraeus would be granted a top-level security clearance while he’s still on probation or whether Trump could grant him a presidential pardon.

Trump also spent the good part of the general election berating his Democratic opponent, Hillary Clinton, for her mishandling of classified information. In theory, it could be difficult for him to turn around and appoint an official who, while punished, acted even more carelessly.

That said, Petraeus’ years of service under a Democratic administration could quell opposition among Democrats, many of whom are on the record praising Petraeus over the years.

Installing Petraeus as national security adviser could also go a long way toward helping the president mend fences with the intelligence community, which has long been wary of Trump and his core group of advisers, including Flynn.

“Folks would be much more comfortable with Petraeus, that’s for sure,” said a White House aide.

Late last year, Trump briefly considered Petraeus for secretary of state, but ultimately settled on former Exxon Mobil Chairman Rex Tillerson. At the time, Petraeus said it would be up to Trump to determine whether his lifetime of service to the country was enough to overcome the seriousness of his missteps in the Broadwell affair.

“They’ll have to factor that in,” Petraeus told ABC News of his criminal record. “And also, obviously, my 38½ years of unique service to our country, in uniform and at the CIA,” he said.