First observation that the movement of a planet or asteroid in its orbit was affected by another planet? Answers to the question How did Kepler determine the orbital period of Mars? describing careful observations centuries ago got me thinking.

Question: What was the first analysis of observations that directly demonstrated that the movement of a planet or asteroid in its orbit was affected by gravitational attraction by another planet?

I don't mean inferences based on the spacing of orbits, I'm thinking of detailed positional measurements; something like planet/asteroid A was X kilometers or Y arcseconds away from it's predicted position and it couldn't be accounted for if not for the gravitational effects of planet B.

I am not sure if First observation that the Sun and Jupiter (and friends) move around a common barycenter? is a completely separate question, or if this confirmation happened all at once, but I've currently asked it separately.
My best guess: The late periapsis of 1P Halley in 1759.

In 1705, with the mathematical assistance of Issac Newton, Edmond Halley published Synopsis of the Astronomy of Comets which made the prediction that the comet observed in  1682 had previously been observed in 1531 and 1607 was the same object returning about every 76 years or so.  He included a rough estimation of the gravitational effects of Jupiter and Saturn, and predicted it would return in 1758.

From Wikipedia: Halley's Comet


  Halley's prediction of the comet's return proved to be correct,
  although it was not seen until 25 December 1758, by Johann Georg
  Palitzsch, a German farmer and amateur astronomer. It did not pass
  through its perihelion until 13 March 1759, the attraction of Jupiter
  and Saturn having caused a retardation of 618 days. This effect was
  computed prior to its return (with a one-month error to 13 April) by a
  team of three French mathematicians, Alexis Clairaut, Joseph Lalande,
  and Nicole-Reine Lepaute. The confirmation of the comet's return was
  the first time anything other than planets had been shown to orbit the
  Sun. It was also one of the earliest successful tests of Newtonian
  physics, and a clear demonstration of its explanatory power.


This predates the discovery of Uranus(1781) and Neptune (1846).