The Tyrannosaurus Rex lived in the western United states about 65 million years ago during the Cretaceous period. There is fossil evidence to show that the T-Rex was densely populated in what is now Montana and Wyoming.
Although that area of the United States is dry and flat, fossil records show us that it was likely a swampy, wet region when the T-Rex was living there. They were believed to live in densely populated jungle-like areas where lots of other dinosaurs were living (their food source).
Even as the king of the jungle, the T-Rex did not live very long. The oldest fossil on record was about 28 years old and showed signs of much trauma over its lifetime. It is unsure whether the T-Rex lived such a short lifetime because of constant combat (and died from its injuries) or for other reasons.