Black rats adapt to a wide range of habitats. In urban areas they are found around warehouses, residential buildings, and other human settlements. They are also found in agricultural areas, such as in barns and crop fields. In urban areas they prefer to live in dry upper levels of buildings, so they are commonly found in wall cavities and false ceilings. In the wild, black rats live in cliffs, rocks, the ground, and trees. They are great climbers and prefer to live in trees, such as pines and palm trees. Their nests are typically spherical and made of shredded material, including sticks, leaves, other vegetation, and cloth. In the absence of trees, they can burrow into the ground. Black rats are also found around fences, ponds, riverbanks, streams, and reservoirs.