in The Return of the King, when the "Fellowship" moves from Edoras towards Rivendell on the way back to the Shire, and they come to the part where Aragorn leaves the party, he says to Pippin: Remember, you are still in my service, i give you leave now, but i can make a call on you". But earlier during the battle for Minas Tirith in the chamber of Faramir, Denethor releases Pippin from his service, and from the service of Gondor.