So, you get cast into an oubliette. Perhaps you're a Girl in the Tower, or simply slaving away for your evil relatives in the dusty confines of the house. Or maybe you're just a lighthouse keeper. In any case, your contacts with other people, if any, are short and sporadic.
There are only so many Tally Marks on the Prison Wall you can make, and Captivity Harmonica may let you express yourself, but won't provide any warmth in the rat-infested hole you found yourself in. And you really don't want to Go Mad from the Isolation. And playing chess with your Imaginary Friend goes stale after a while.
But! Rats (and, at least in cartoons, mice) are quite social, friendly, Resourceful Rodents, and they eat pretty much everything humans eat, so you can share your meagre rations with them. And they will reward you with a tail to cry on.
In short, when you're Too Desperate to Be Picky for company, rats' (somewhat undeserved) bad rap may stop looking so bad. Especially if you were Better with Non-Human Company in the first place.
And maybe you can get your new friends to help you escape.
Has nothing to do whatsoever with Rats in a Box or Pet Rat.
Compare Adoring the Pests and Homeless Pigeon Person, who's friends with "flying rats". Sister Trope to Companion Cube, where the "rodent" is an inanimate object.
Examples:
- Batman villain Ratcatcher has special ability to communicate with and train rats. While incarcerated in Blackgate Penitentiary, he his uses his furry friends to smuggle contraband and run messages through the prison.
- In Hans Christian Andersen's "How to Cook Soup Upon a Sausage Pin," one of the mice who has taken up the challenge to find the eponymous recipe tracks down a prisoner about whom it was said that his crimes were just soup upon a sausage pin (an expression meaning a lot made out of nothing — in this case, all he'd done was say something that angered the wrong people). The mouse stays in the cell out of pity for the prisoner and they become close friends until the prisoner is taken away — whether to be executed, freed, or just moved somewhere else is never revealed.
- All Dogs Go to Heaven: Anne-Marie is an orphan girl with the ability to talk to animals. Her first scene in the movie and Establishing Character Moment centers around a conversation between her and the rats infesting Carface's (her captor's) lair. It turns out Carface was using her to interview the racing rats and find out which one is most likely to win.
- Cinderella: The title character is abused and belittled by her family and forced to live as a servant alone in the home. Despite this, she retains a kind heart and has made friends with the Nice Mice who live there, Gus and Jaq. They in turn are a little more anthropomorphic than regular mice.
- In Encanto, the Casita rats are Bruno's friends during his self-imposed exile and helpers in his ongoing task of keeping the prophecy secret and patching the walls. They're smart enough to keep their human well-informed and even to operate a camera. And the human in question has not even been blessed with the gift of speaking with animals like Antonio.
- The Thief and the Cobbler: While Tack was locked in the dungeon by Zigzag, he befriended some rats by sharing his bread with them. He even befriended a white mouse and took it after he escaped.
- WALL•E only has a nameless cockroach for company, as all the other Waste Allocation Load Lifters of Earth-class are kaput. The odd li'l 'bot likes to play with the insect, and newcomer EVE is also charmed by this docile roach. In fact, this roach's affection for WALL-E convinces EVE that he's not a threat.
- The Green Mile: A mouse named Mr. Jingles ends up becoming the pet of Eduard "Del" Delacroix, and later, John Coffey. After nearly being killed by Percy, Coffey ends up reviving Mr. Jingles with his powers. After Coffey chooses to be executed despite being innocent, the mouse comes under the care of Paul Edgecomb, until the mouse dies 64 years later.
- Island of Fire: Andrew, a nerdy bespectacled Nice Guy who voluntarily had himself sentenced to prison to investigate the murder of his father-in-law, eventually realizes the harshness of prison life, where the only friend and Morality Pet he has is a mouse he "adopts". He ultimately loses his mind when the corrupt prison system, in order to break him, serves him lunch, rice with his dead mouse buried in it.
- The Suicide Squad: Cleo Cazo was the daughter of a man called the Ratcatcher, a drug addict who nonetheless believed in the power of rats and taught her how to befriend and control them with various gadgetry. After her father's death, Cleo was left to fend for herself with only the rats for company, committing thefts until she ended up in Belle Reve with her favorite rat friend, Sebastian.
- The 2003 version of Willard. The main character is a social misfit who is mistreated at his job and lives with his abusive, ill mother in a decaying house. He eventually befriends the rat colony that resides there and learns to order them around, with disastrous consequences.
- Parodied in Adventures of Huckleberry Finn. After Jim, Huck's foster mother's escaped slave, is captured, Tom Sawyer's Zany Scheme to help Huck break him out includes an insistence that any good prisoner should befriend the rats they share their cell with, so Jim does so. It bears mentioning here that Tom has an overactive imagination and has read way too many adventure novels.
- In A Little Princess, Sarah names, feeds, and befriends the rat who lives in the wall of her attic room.
- In Guards! Guards! the temporarily deposed and imprisoned Lord Vetinari is thrown into his own rat-infested dungeon. Unknown to his jailers, the rats are sapient and happy to bring him news from outside in return for advice on how to resolve their conflict with the palace's other vermin.
- Room: Attempted by Jack, who tries to play with a mouse that he finds in Room (where he and Ma have been held captive for years). Averted by Ma, who smacks it when she finds it to avoid the risk of disease or food contamination.
- Blackadder: In the first season finale, Prince Edmund finds himself locked up in a small dungeon by his rival Phillip of Burgundy, convicted to a Cruel and Unusual Death (being eaten by snails for 15 years), where he meets another prisoner called Mad Gerald (who is, as his name implies, mad), whose only friend is Mr. Rat, whom he treats with genuine affection and tells lengthy anecdotes about his endearing little nose and squeaks. That said, Edmund is a lot more interested in Mad Gerald's other friend, Mr. Key.
- The Brittas Empire: A side plot in "Set in Concrete" involves Ben becoming friends with a mouse, much to his mother Carole's horror. It is also suggested that the reason that Ben became friends with the mouse is that, having to spend much of his time playing in a cupboard whilst Carole works behind reception, he is probably in desperate need of company.
- It's Always Sunny in Philadelphia: Spoofed in "Charlie's Home Alone." Charlie, alone in the pub and with his leg caught in a Bear Trap (it's a long story), befriends a rat that he finds so he can have someone to talk to... until he remembers his ritual to help the Eagles win the Super Bowl, which involves eating something brown. Cut to Charlie eating the rat minutes later.
- Robin of Sherwood has, as a recurring character, a nameless prisoner in the dungeon at Nottingham Castle, who has gone completely insane down there and refuses to leave, claiming that he can't abandon his pet rat "Arthur". (It is implied that "Arthur" may simply be whichever rat happens to be nearest to him.) The character was originally intended to appear in only one episode, but the actor's performance was so funny that he was brought back every so often as a Running Gag.
- The Witcher (2019): When Jaskier is in prison, he befriends some mice. He names them and talks to them like they're part of his musical group.
- Girl Genius: He's not literally in a cell, but when British airman Thomas Crothers ends up stranded on an island controlled by the local Mad Scientist and her giant killer mutant rats, he befriends the local (normal) rat population and they help him hide and survive.
- Looming Gaia: When Karenza was sentenced to the dungeon for making a too ugly statue of the king of Alqamah, she shared her food with the dungeon rats, and in turn they didn't gnaw at her fingers and toes. A beast nymph named the Vermin Queen blessed her soul for her kindness to the animals so that no beast could harm her.
- Avatar: The Last Airbender: Hama, one of the surviving waterbenders of the Southern Water Tribe, explains that the waterbenders were kept in a Tailor-Made Prison designed to keep them from using their element. The rats that milled around their cages were the guinea pigs Hama used to develop bloodbending.
- The Simpsons:
- Parodied during a retelling of The Count of Monte Cristo, while Homer is locked up in prison.
Homer: (To the mouse in his hands) Oh, little mouse! You are the only thing that keeps me sane! (Beat, glances around, eats the mouse) Now I have nothing!
- In "The Frying Game", a violent prisoner attempts to strangle Homer right before the latter is about to be executed. After the two are broken up, the prisoner asks a mouse in the cell if he wants some cornbread, only to threaten to kill the mouse.
- Parodied during a retelling of The Count of Monte Cristo, while Homer is locked up in prison.
- Total Drama World Tour: Refusing to give up on the prize money, even after being voted out, Ezekiel becomes a stowaway on the jumbo jet. In this time, he befriends the rats hiding in the cargo hold, helping them escape when the plane is about to crash.