WASHINGTON — An attorney for adult film star Stormy Daniels has filed a motion seeking to depose President Donald Trump and his attorney over the alleged sexual encounter she had with the president years ago.

If successful, the deposition would be the first of a sitting president since President Bill Clinton in 1998.

Here's a look back at other times presidents have testified under oath:

June 1994 — President Bill Clinton and first lady Hillary Rodham Clinton provide sworn testimony to the special prosecutor investigating the death of a White House lawyer and White House contacts with Treasury regulators about the Whitewater investigation. The president was questioned for 90 minutes in the White House residence by Whitewater special counsel Robert Fiske and an assistant. Later, Mrs. Clinton was interviewed for an hour. The session marked the first time a sitting president had given a deposition about his official conduct, the New York Times reported at the time.

April 1995 — The Clintons are interviewed under oath by Whitewater independent counsel Kenneth Starr at the White House. The president and first lady were questioned separately, for about two hours each in the residential quarters of the White House.

April 1996 — President Clinton gives four hours of videotaped testimony as a defense witness in the criminal trial of his former Whitewater business partners. After testifying for the defense for 45 minutes and a brief break, the president faced more than three hours of cross-examination by the prosecution at the White House.

July 1996 — President Clinton testifies for more than two hours in the case of Arkansas bankers Herby Branscum Jr. and Robert M. Hill. They were accused of illegally using bank funds to reimburse themselves for contributions to political candidates — including Clinton in 1990 when he ran for governor and in 1991 when he considered seeking the presidency.

January 1998 — President Clinton testifies for almost six hours in response to the Paula Jones sexual harassment lawsuit. During the lengthy session in his lawyer's office, Clinton denies having a sexual relationship with Monica Lewinsky. The testimony marked the first time a sitting American president had testified as a defendant in any criminal or civil suit.

August 1998 — Clinton undergoes more than four hours of questioning from independent counsel Kenneth Starr before a federal grand jury and testifies that he engaged in an inappropriate relationship with Lewinsky, a White House intern. The questioning is transmitted via a scrambled video signal from the White House to the grand jury. The session marked the first time a president had testified before a grand jury investigating his own conduct.

Other examples:

Reagan:

— In December 1987, then-President Ronald Reagan submitted written answers that amounted to sworn testimony in response to questions submitted by independent counsel Lawrence Walsh in the investigation of the Iran-Contra affair. After leaving office, Reagan also testified for the defense in the Iran-Contra trial of his former national security adviser, John Poindexter. Poindexter was convicted on five felony counts, but the convictions were later overturned on appeal. Then-Vice President George H.W. Bush also gave sworn testimony.

Carter:

— President Jimmy Carter testified twice on video, once as a government witness in the prosecution of a Georgia state senator in 1978 and again in an investigation of financier Robert Vesco in 1980. In 1979, Carter gave a four-hour sworn deposition to the special counsel who investigated the Carter family's peanut business in Georgia. The special counsel concluded there was no evidence of any criminal wrongdoing. Carter also gave a deposition to the Justice Department about conversations he'd had with his attorney general regarding an investigation into whether his brother had violated the Foreign Agents Registration Act, according to the New York Times.

Ford:

— On November 1, 1975, then-President Gerald Ford gave a videotaped deposition in the trial of Lynette "Squeaky" Fromme, who was convicted of trying to assassinate Ford. The videotape was played for jurors at Fromme's trial.

Nixon:

— In May 1975, former President Richard Nixon delivered secret testimony to a grand jury about the Watergate break-in that drove him from office. The testimony was ordered released 36 years later, in 2011, by a federal judge.

Jefferson:

— The first attempt to force a sitting president to testify at a criminal trial came in in 1807 from Aaron Burr, the former vice president, who was on trial for treason. Burr tried to force President Thomas Jefferson, under whom he had served, to travel from Washington to Richmond, Virginia, to testify at the trial. The president eventually got out of going.