In the Hammersley–Aldous–Diaconis process, infinitely many particles sit in ℝ and at most one particle is allowed at each position. A particle at x, whose nearest neighbor to the right is at y, jumps at rate y−x to a position uniformly distributed in the interval (x, y). The basic coupling between trajectories with different initial configuration induces a process with different classes of particles. We show that the invariant measures for the two-class process can be obtained as follows. First, a stationary M/M/1 queue is constructed as a function of two homogeneous Poisson processes, the arrivals with rate λ and the (attempted) services with rate ρ>λ. Then put first class particles at the instants of departures (effective services) and second class particles at the instants of unused services. The procedure is generalized for the n-class case by using n−1 queues in tandem with n−1 priority types of customers. A multi-line process is introduced; it consists of a coupling (different from Liggett’s basic coupling), having as invariant measure the product of Poisson processes. The definition of the multi-line process involves the dual points of the space–time Poisson process used in the graphical construction of the reversed process. The coupled process is a transformation of the multi-line process and its invariant measure is the transformation described above of the product measure.