Rex is a male border collie who is the leader of the farm animals the Mr. Hoggetts lead sheepdog, a major character in Babe and a minor character in it's sequel.
Rex once tried to lead a herd of sheep during terrible thunderstorm but the sheep were too much in a panic and the hurricane killed them while Rex barely managed to survive, only ending up losing about half of his hearing ability which makes him lose the Grand National Sheepdog Contest. Since that tragic event, Rex has become bitter and somewhat hostile and easily provokable.
Despite his viciousness, however, he is shown to care for his mate Fly and their puppies but he was very reluctant at the idea of Babe, a pig herding sheep. When Babe proved to be a surprising professional, Rex grew jealous of the Sheep Pig. Since he felt insulted of Babe's different methods of herding the sheep (such as politeness instead of outright roughness), Rex's jealousy soon lead to him attacking and injuring Fly and accidentally bites Hoggett's right hand who tries to break them up in a fit of rage. Hoggett had no other choice but to chain him, muzzle him and even sedate him until he is calm. During the wild dogs attack on their farm who killed Maa, Rex was resting under the wagon as Hoggett arrives carrying Maa who is laying dead in the back of his truck, he was devastated and Babe who scared the wild dogs away was being falsely accused for killing Maa by Hoggett and prepares to shoot him. But Hoggett is prevented from killing Babe by Fly and Esme who then inform him that the other farms owned by the Mitchells has lost 6 lambs to the wild dogs and making him realizes that Babe was innocent and sets him free.
When Babe runs away when the nasty cat Dutchess gets her revenge on Babe by revealing to him that farmers eat pigs, Rex, realizing how heartbroken Fly is without Babe and how much good the pig has done, regrets his past behavior and rushes to find the pig and possibly scolds and sues Dutchess for saying those terrible words to Babe. Rex encourages Babe that the pig is now the farmer's only hope of entering the herding contest.
At the Sheepherding Contest, Babe was having severe difficulty trying to get the sheep to listen to him. Not willing to make Hoggett look like an idiot, Rex raced back to the farm and politely asked the Hogget flock for a password. The sheep chanted "Baa Ram Ewe. Baa Ram Ewe. To your breed, your fleece, your clan be true. Sheep be true. Baa Ram Ewe." Grateful, Rex sprinted back to the competition (a man chases him to prevent him from reaching Babe) and repeated the code to Babe, leaving it all up to the pig. Rex and Fly watched as Babe lead the sheep into the pin, just as the timer ran out. As a result, the pig won the contest and everyone cheered! And Rex, for the first time since his tragic accident, smiled proudly and eagerly licked Fly in triumph.
Babe: Pig in the City