President Trump has rejected the hiring of former Reagan and George W. Bush foreign policy aide Elliott Abrams as the deputy secretary of state after seeing writings in which Abrams had been critical of Trump before his victory last year, a person with knowledge of the decision said Friday.

Abrams interviewed for the influential No. 2 job Tuesday at the White House in a meeting also attended by Secretary of State Rex Tillerson. Tillerson had backed Abrams for the job, arguing that the veteran Republican official’s knowledge of the State Department and Washington’s foreign policy bureaucracy would complement Tillerson’s lack of government experience, people familiar with the selection process said.

The meeting went smoothly, said the person familiar with the session, but after the president saw the comments, Tillerson’s choice was vetoed. Trump’s decision was first reported by CNN.

Most damaging to Abrams appears to be a historical piece he wrote comparing the 2016 election to 1972 and counseling Republicans to voice their objections to Trump.

“Do not allow the Republican convention to be a coronation wherein Trump and Trumpism are unchallenged,” Abrams wrote in a piece for the conservative Weekly Standard. “The party needs to be reminded that there are deep divisions, and Trump needs to be reminded of how many in the party oppose and even fear his nomination.”

Current and former officials familiar with the Abrams decision requested anonymity to discuss a personnel matter. The White House has not publicly discussed Abrams’s candidacy. A White House spokesman did not return messages asking about Abrams on Friday.

Best known for his role in the Reagan-era Iran-contra scandal, Abrams had been considered the leading choice for a post that often goes to seasoned foreign policy professionals. His rejection reopens the search and leaves Tillerson as the lone ­Senate-confirmed person chosen by Trump who is on the job at the State Department. Tillerson’s chief of staff and several other advisers around the new top diplomat were campaign aides or political advisers selected by the White House.

The struggle to fill a key job illustrates how difficult it has become to find suitable candidates for top State Department jobs. The Trump administration has issued a near-total ban on hiring anyone on the long list of Republicans who signed public letters last year opposing Trump on national security grounds. Many other veterans of the Reagan and Bush presidencies have removed themselves from consideration for senior jobs or are considered too old to return to government.

Abrams did not sign a letter but did write critically about Trump while advising two of his GOP primary rivals.

Paula Dobriansky, who also served in the Reagan and George W. Bush administrations, is another potential choice for deputy. One of George W. Bush’s most controversial advisers, former U.N. ambassador John Bolton, was also mentioned as a possible deputy but was opposed by Tillerson, people familiar with the process said.

Although recent secretaries of state have had two deputies, the Trump administration might fill only one slot, according to current and former officials.

Abrams pleaded guilty in 1991 to concealing knowledge of the scheme to sell arms illegally to Iran and divert the profits to anti-communist rebels in Nicaragua.

Abrams was pardoned by President George H.W. Bush.