Eventually the Jade emperor invited Monkey to Heaven where he gave him the title of ‘Great Sage equal of Heaven’ and a job cleaning out the heavenly stables, hoping this would keep Monkey out of trouble...
But it didn’t. Angry at not being invited to the grand peach banquet, he ate all of the peaches of immortality, some of which took 9 years to ripen, and also drank the magical elixir !! The Buddha could take no more of his nonsense and buried him under Five Peak Mountain where he stayed for five hundred years.