House Lannister of Casterly Rock is one of the Great Houses of Westeros and the principal noble house of the westerlands. They claim descent from Lann the Clever, a legendary trickster of the Age of Heroes who is said to have swindled the Casterlys out of their fortress with naught but his wits and a sack of gold. For thousands of years their forefathers ruled as Kings of the Rock, breaking marauder and rival lord alike; when the Andals came over the narrow sea, King Gerold III gave his only daughter and his crown to the Andal knight Ser Joffrey Lydden, who took the Lannister name and arms, and the line that called itself Lannister thereafter carried Andal blood alongside the lion. Their ancestral Valyrian steel greatsword Brightroar was carried into the Doom of Valyria by King Tommen II in the last years before Aegon's Conquest, and neither king nor blade has been seen since.
When Aegon the Conqueror came west with his sisters and their dragons, Loren the Last marched out beside King Mern IX of the Reach at the head of fifty-five thousand men. The Two Kings met all three Targaryens at the Field of Fire and were burned in their thousands; Loren escaped the flames, knelt the next day, and was permitted to keep his lands as Lord Paramount of the westerlands and the first Warden of the West. A century later Lord Lyman Lannister harbored Prince Aegon and Princess Rhaena from the Poor Fellows of the Faith Militant uprising and bent the Rock to Jaehaerys I after the death of Maegor the Cruel. Loren's distant grandson Lord Jason Lannister and his twin Ser Tyland came of age in time for the Dance of the Dragons; both declared for Aegon II, Jason riding into the riverlands until he was struck down by Pate of Longleaf at the Battle of the Red Fork, while Tyland served as master of coin, was tortured blind and gelded after the fall of King's Landing, and rebuilt his fortunes as Hand of the King in the regency of Aegon III. Lady Johanna Westerling held the Rock for her four-year-old son Loreon against Dalton Greyjoy's reaving of the western coast and the sack of Lannisport, and won the Battle at Kayce with the broken remnant of the Lannister fleet.
The unofficial words A Lannister always pays his debts are heard far more often than the true ones, and were graven into the realm forever in the days of Lord Tytos, called the Toothless Lion. He was too genial to govern his bannermen, and when Houses Reyne of Castamere and Tarbeck of Tarbeck Hall renounced their fealty in 261 AC, his son Tywin raised the host of the Rock without his father's leave and ended both houses in a single season — Tarbeck Hall thrown down upon the head of Lady Ellyn, and the galleries of Castamere flooded with the stream that ran above them. The song The Rains of Castamere has carried the lesson down the generations since. Tywin served twenty years as Hand of the King to Aerys II Targaryen and made the realm rich, until the Mad King named Ser Jaime to the Kingsguard to rob his Hand of an heir and Tywin laid down the chain. He sat Robert's Rebellion out behind the Rock's closed gates until Robert had killed Rhaegar at the Trident, then opened the gates of King's Landing for the rebels, put Princess Elia of Dorne and her children to the swords of Ser Gregor Clegane and Ser Amory Lorch, and laid their bodies in crimson cloaks at the new king's feet.
At the opening of A Game of Thrones the Lannisters stand at the peak of their power. Lord Tywin is Warden of the West and the keeper of the Crown's many debts; his daughter Cersei is queen to King Robert, her three children pass for the king's heirs, and her twin Ser Jaime wears the white cloak. The dwarf Tyrion is the lord's third and most despised child. Tywin's brother Ser Kevan is his right hand; their sister Lady Genna is wed into House Frey of the Twins; their dead brother Tygett's only son Tyrek serves as a royal squire; their youngest brother Gerion is years gone on a fool's quest for Brightroar in the Smoking Sea. The Lannisters are known for their fair golden hair and emerald eyes, their crimson cloaks, and their unbending pride — and for the gold of Casterly Rock that buys them what their lions cannot take. By the events of A Game of Thrones, however, the deepest seams of the Rock are quietly running dry, a secret the Old Lion guards as closely as the Rock itself.