When Ronald Reagan was in the White House, one of the nation's top law enforcement officials advised Congress that if serious allegations were ever lodged against a president, the Justice Department would have no choice but to call upon a special investigator to look into the matter.
"Any attorney general that did the opposite of that would not be acting sensibly and would be subject to severe public criticism," the U.S. associate attorney general told a Senate panel.
That associate attorney general was Rudy Giuliani.
He's now President Donald Trump's personal attorney and ferociously insists there was "no basis" for the Justice Department to, as he describes it, "illegally" appoint special counsel Robert Mueller to investigate a wide array of allegations tied to Trump.
In fact, as Trump's chief legal defender, Giuliani has espoused a number of positions that seem to belie the stances he took when he was charged with enforcing the law.
Over eight years in senior positions at the Justice Department, Giuliani touted the power and independence of a special prosecutor, promoted the nearly unlimited authority of grand juries and called for high-level government officials accused of wrongdoing to be "treated no differently from other citizens."
Nowadays, even as Giuliani is negotiating the terms of a possible voluntary interview between Trump and Mueller, he's decrying Mueller's probe as "illegitimate" and threatening to go to the Supreme Court if Mueller tries to issue a grand jury subpoena to Trump.
In a recent interview with ABC News, Giuliani recognized the potential disconnect, saying a change in tune "wouldn't be unusual" because he's now a private attorney and, "When you're a prosecutor, you have to interpret things in the light most favorable to making cases."
"As a lawyer you try to represent the best interests of your client," he said.
ABC News spent months locating and accessing records from Giuliani's time as a prosecutor. The records were stored in a government warehouse in Missouri, relegated to sheets of microfiche at college libraries and held by clerks in the federal courthouse in Manhattan, where Giuliani spent nearly six years as U.S. attorney for the Southern District of New York. He served more than two years as associate attorney general in Washington.
Though they do not directly address legal questions surrounding the presidency, the records reflect how the law may not be as clear-cut as Giuliani's recent defense of Trump suggests. And, when asked to comment for this story, he recently acknowledged to ABC News that arguments over Mueller's subpoena power are "kind of hypothetical" because "no one's ever gone to court on this."
After negotiating for months, Giuliani recently submitted a new offer for Trump to sit down with Mueller's team, but the offer included limits on what investigators can ask the president, Giuliani said.
"We're not going to allow him to be questioned about obstruction because we don't think they have a right to," Giuliani told ABC News, referring to allegations that Trump may have tried to obstruct justice in his interactions with key U.S. officials and by firing then-FBI Director James Comey in the midst of the FBI's growing probe of Russia's meddling in the 2016 presidential election.
Giuliani maintains Mueller's investigation has illegitimately "spanned out so much," with grand juries in Washington and Virginia charging former Trump campaign chairman Paul Manafort for decade-old financial transactions, and a grand jury in New York investigating Trump's previous personal attorney, Michael Cohen.
Like Trump, Giuliani has also derided the initial launch of the federal probe, especially for its use of an unverified dossier alleging collusion between Trump associates and Russian operatives.
But when Giuliani was U.S. attorney, he endorsed a grand jury's wide authority to investigate unverified claims and anything else it comes across.
"The [grand jury] may act on tips, rumors, evidence offered by the prosecutor, or their own personal knowledge," said several court filings submitted under Giuliani's name. "Furthermore, the grand jury investigation may uncover violations that were not, and could not have been, anticipated: the grand jury's investigation is not limited to a single subject matter."
In 1983, when one witness refused to comply with a grand jury subpoena that he said was too broad in its requests, Giuliani's office insisted a grand jury's "very generous" scope of inquiry "is not limited to events which may themselves result in criminal prosecution, but is properly concerned with any evidence which may afford valuable leads for investigation of suspected criminal activity."
Similarly, other filings submitted on behalf of Giuliani advocated "the grand jury's ability to uncover unforeseen violations," noting "the grand jury often will not be able to anticipate" what new evidence will show.
Even though Giuliani now concedes there is no specific precedent for a case like Mueller's, the president's personal attorney has for months exuded confidence when arguing that executive privilege shields Trump from a grand jury subpoena.
According to Giuliani, Trump "has at least a qualified" executive privilege, based on a 1997 case involving then-President Bill Clinton's former Agriculture secretary, Mike Espy.
In that case, a federal appeals court in Washington declared that executive privilege immunizes a president from subpoena unless investigators can show a "particularized need" for the evidence sought and "can't get it any other way," as Giuliani put it.
Giuliani said that if Trump is subpoenaed, he would first demand Mueller lay out his particularized need for the president's testimony.
"You need to show why you need it," he told ABC News.
But when Giuliani was U.S. attorney, filings submitted on his behalf warned against such a demand on matters before a grand jury.
"[A]ny requirement that the grand jury particularize its purpose would impinge upon the strict requirements of integrity and secrecy which are hallmarks of the grand jury process," said a filing under his name in 1984, when prosecutors were seeking to force two companies to comply with grand jury subpoenas. The filing was not addressing the unique situation of a subpoena to a president.
Still, requiring a grand jury to "divulge what is being investigated and why the [pieces of evidence] sought are relevant might compromise the integrity of that investigation," said another filing endorsed by Giuliani a year earlier.
Speaking recently to ABC News about a potential subpoena fight with Mueller, Giuliani said he would also argue that Mueller's investigators can obtain the information they seek from Trump through other means.
If, for example, investigators want to know why Trump fired Comey, they can obtain that information from Trump's TV interview two days after Comey's removal, Giuliani said, without noting the TV interview -- unlike grand jury testimony -- was not under oath.
"We would say, 'Sorry, you have [it] on television. Here's the tape, here's the explanation," Giuliani told ABC News.
But one of the attorneys who argued on behalf of the White House in the 1997 case now being cited by Giuliani says Giuliani's interpretation of the record is "dead wrong."
"What Mr. Mueller will be seeking from the president is his own knowledge -- what he was thinking, why he did things. And it's information that isn't available from anywhere else," said Neil Eggleston, a former federal prosecutor who also served as President Barack Obama's White House counsel. "I think it would be easy for Mr. Mueller to show that he needs that information for the grand jury investigation."
In fact, when Giuliani was U.S. attorney, he supported the notion that a "grand jury investigation is not fully carried out until every available clue has been run down."
And in 1983, when prosecutors tried to force three men to testify before a grand jury, Giuliani endorsed a court filing that said, "It is axiomatic that the Grand Jury has a right to every man's evidence." A later filing under Giuliani's name echoed that sentiment, saying it is a "seminal rule" that the public "has a right to every man's evidence."
The filings from Giuliani's time as U.S. attorney noted that some people are protected by constitutional or other privileges, and Giuliani now says such privileges are why Trump is "not required to testify."
But in 1982, when Giuliani was testifying to the Senate, he insisted it was important that high-level government officials accused of wrongdoing "are treated no differently from other citizens." After all, he told the panel, "fairness and uniformity" are "critical to public acceptance of investigative prosecutive decisions."
Giuliani has recently attacked the FBI for executing court-approved search warrants at Cohen's home and office in New York, where Trump's former personal attorney is facing a criminal investigation by prosecutors in the Southern District of New York stemming, but separate, from Mueller's own probe.
"That is an outrageous violation of attorney-client privilege beyond Donald Trump's attorney-client privilege," Giuliani told Fox News in May, three weeks after the FBI seized electronic media, business records, and an array of other documents from those locations. Cohen claimed he was representing several clients, and "a lot of innocent people" had their attorney-client privilege pierced by the FBI raids, Giuliani insisted.
Trump himself similarly attacked the raids, saying on Twitter the day after it, "Attorney-client privilege is dead! ... A TOTAL WITCH HUNT!!!"
But in 1983, a court filing submitted on behalf of Giuliani said this about attorney-client privilege: It is "axiomatic that otherwise privileged communications are subject to disclosure if sought or obtained for the purpose of enabling or aiding the client to commit a crime. ... This is so whether or not the attorney is aware of the crime; his good faith is irrelevant."
"Obviously, '[t]he mere fact that a person is an attorney does not render as privileged everything he does with and for a client,'" the filing stated. Any suggestion that lawyers are "entitled to blanket immunity" is a "far-reaching and dangerous position," Giuliani's office said in another filing related to the case.
At the time, a federal grand jury in New York was investigating allegations of fraud, bribery and tax evasion tied to the high-profile collapse of Drysdale Securities Corporation. The grand jury issued subpoenas to a company executive and his tax attorney, demanding an array of business records. But the executive and his attorney refused to comply, citing attorney-client privilege.
"These sweeping contentions ignore well-settled precedent and seriously misconstrue the limited nature of the attorney-client privilege," Giuliani's office said in its 1983 brief.
Just this week, despite the previous concerns expressed by the president about attorney-client privilege, Trump's legal team chose to waive the privilege for a recording Cohen secretly made of a conversation with Trump. A "special master" overseeing materials gathered in the Cohen case had determined the recording was protected by attorney-client privilege.
There is at least one area where Giuliani's recent statements in defense of Trump mirror his statements from decades ago.
Last month, Giuliani told Fox News that even with no public evidence incriminating Trump, Mueller's investigation could have the effect of "delegitimizing" the president.
During his Senate testimony in 1982, when the Justice Department was urging Congress to let it appoint its own special prosecutors rather than cede such authority to the courts, Giuliani said anyone under investigation by a special prosecutor will be left "seriously damaged and will carry that stigma with him publicly for a very long time."
"I believe it is devastating to an accused, even to an accused who was so-called cleared at the end of it," Giuliani said at the time, according to a transcript of his testimony. "The fact that the person was cleared seven months, eight months to one year later is a much less significant fact, and for many years you carry the stigma and burden of having been investigated by a special prosecutor."
Despite those concerns, however, Giuliani said serious allegations against a president would certainly warrant a special investigator.
"Anyone who would give short shrift to a serious allegation against a public official or, for example, one that received media attention, that person not only shouldn't be attorney general of the United States, he probably is not sensible to be attorney general of the United States," Giuliani testified. "It would be difficult to imagine a situation in which any attorney general, regardless of his relationship to the president, would not appoint [a special] counsel to investigate allegations, serious allegations, ones that had to be investigated against the president."
Mueller was appointed last year after Trump fired Comey, prompting Comey to leak a series of memos about his personal interactions with Trump. Those memos further raised questions over whether Trump may have sought to obstruct justice, including the investigation into his former national security adviser, Mike Flynn.
By then, Attorney General Jeff Sessions had recused himself from the federal probe of Russia's interference in the 2016 presidential election. So it was Deputy Attorney General Rod Rosenstein, the acting attorney general on election-related investigations, who selected Mueller.
In his 1982 testimony, Giuliani said an attorney general's decision to appoint a special prosecutor "would suggest an attorney general who judiciously made the determination on his own that this was a matter where the public and the department would be best served by an independent person passing judgment on this case."
Mueller's office declined to comment for this article.