Chimpanzees (Pan troglodytes) adapt their nesting behavior after large‐scale forest clearance and community decline

Chimpanzees (Pan troglodytes) build nests at night for sleeping and occasionally during daytime for resting. Over the course of seven years, forest fragments in Bulindi, Uganda, were reduced in size by about 80% when landowners converted forest to agricultural land. However, unlike other studies on nesting behavior in response to habitat disturbance, chimpanzees at Bulindi had no opportunity to retreat into nearby undisturbed forest. To understand behavioral adaptations to forest clearance, we compared Bulindi chimpanzees' nesting characteristics before and after this period of major deforestation. After deforestation, chimpanzees built nests at lower heights in shorter trees, and reused a larger proportion of their nests. Additionally, average nest group size increased after deforestation, even though community size declined by approximately 20% over the same period. The substantial decrease in available forest habitat may have caused the chimpanzees to aggregate for nesting. However, more cohesive nesting may also have been influenced by dietary shifts (increased reliance on agricultural crops) and a need for enhanced safety with increased human encroachment. Conversely, the chimpanzees selected similar tree species for nesting after deforestation, apparently reflecting a strong preference for particular species, nested less often in exotic species, and built integrated nests (constructed using multiple trees) at a similar frequency as before fragment clearance. Chimpanzees living in unprotected habitat in Uganda, as at Bulindi, face mounting anthropogenic pressures that threaten their survival. Nevertheless, our study shows that chimpanzees can adjust their nesting behavior flexibly in response to rapid, extensive habitat change. While behavioral flexibility may enable them to cope with deforestation, at least to a certain point, the long‐term survival of chimpanzees in fast‐changing human‐modified landscapes requires intensive conservation efforts.

Among great apes, nesting behavior (e.g., the height at which nests are constructed and the size and species of trees selected) varies according to habitat and thus may be expected to change as a result of human habitat disturbance. All great apes construct nests (also known as "beds" or "sleeping platforms") each night for sleeping, and occasionally for resting during the day (Fruth & Hohmann, 1996;Goodall, 1962). Chimpanzees (Pan troglodytes) specifically build new nests from living branches, twigs and foliage arboreally in trees, or, more rarely, on the ground (e.g., Goodall, 1962;Tagg et al., 2013;Zamma & Ihobe, 2015).
They may also choose to reuse an existing nest, typically by adding fresh vegetation on top of an older nest (Fruth & Hohmann, 1996). It has been suggested that nest reuse is more common in drier habitats, where tree density is lower and fewer trees are available with fresh leaves for nesting (Fruth & Hohmann, 1996).
Preference for particular tree species for nesting varies among chimpanzee populations. Within habitats, preference is often independent of the availability of tree species Furuichi & Hashimoto, 2004;Granier et al., 2014;Hakizimana et al., 2015;Samson & Hunt, 2014;Stanford & O'Malley, 2008). The preference for certain tree species could depend on the quality of the wood (e.g., strength and flexibility of branches) and leaves (e.g., size and density of foliage) (Fruth et al., 2017;Samson & Hunt, 2014).
Other factors, such as socially learned or "cultural" preferences for particular species, may also exist (Baldwin et al., 1981;Goodall, 1962).
However, sometimes chimpanzees build an integrated (or "composite") nest, using multiple trees and/or plants of one or more species (Hernandez-Aguilar et al., 2013;McCarthy et al., 2017;McLennan, 2018). Often, one tree provides the main support, while one or more other trees provide additional support. Integrated nests are usually built in smaller trees with a smaller diameter at breast height (DBH) compared to nests in single trees (Hernandez-Aguilar et al., 2013). Small trees may not be capable of supporting a chimpanzee's weight individually; however, a nest that integrates multiple small trees could provide adequate support.
Chimpanzees typically build their nests at a height between 10 and 20 meters (Fruth & Hohmann, 1996). Nest height has been shown to be influenced by the sex of the nest-builder, with males often constructing nests lower than females (Brownlow et al., 2001;Stewart & Pruetz, 2020).
Nest height can also be influenced by environmental factors such as predation pressure, humidity and, potentially, avoidance of insect vectors (Fruth et al., 2017;Koops, McGrew, de Vries, et al., 2012;Krief et al., 2012;Samson et al., 2013). When predation pressure is high, chimpanzees build their nests at greater heights and terrestrial nests are usually absent (Granier et al., 2014;Pruetz et al., 2008;Tagg et al., 2013). Human disturbance may impact chimpanzee nesting behavior similarly to predation pressure, depending on habitat features (Hicks, 2010;Last & Muh, 2013). For example, in Lebialem-Mone Forest Landscape in Western Cameroon, terrestrial nests were absent in forests frequented by hunters, but were present in less disturbed forests (Last & Muh, 2013). Conversely, Tagg et al. (2013) found that chimpanzee ground nesting increased with higher human disturbance; however, most ground nests were built in swamps which were less frequented by hunters than other forest areas, but where suitable nesting trees were fewer. Overall, terrestrial nests are usually absent in areas with high human disturbance, especially hunting.
Several studies indicate that chimpanzee densities decline where forest is disturbed through logging, as measured from nest surveys (Balcomb et al., 2000;Morgan et al., 2018;Tutin & Fernandez, 1984).
As chimpanzees prefer to nest in the vicinity of large trees bearing ripe fruits, the decline of such trees after logging may explain a reduction in chimpanzee nests (Balcomb et al., 2000;Basabose & Yamagiwa, 2002;Furuichi & Hashimoto, 2004). As a result of the loss of fruit trees, chimpanzees may retreat into nearby undisturbed forest where there is a higher density of fruit trees (White & Tutin, 2001). However, chimpanzees may avoid forest even when logging is light or when fruit availability was not reduced compared to intact forest, suggesting sensitivity to increased human disturbance that accompanies logging (Skorupa, 1986;White & Tutin, 2001). For example, logging may be accompanied by an increase in bushmeat hunting, including of chimpanzees (e.g., Hicks et al., 2009;Last & Muh, 2013), as logging opens up the forest for hunters. This would also explain the decrease of chimpanzees (and nests) in logged areas.
Between the Budongo and Bugoma Central Forest Reserves in western Uganda, chimpanzees inhabit a human-modified landscape using small forest fragments among village homes, roads and agricultural land (McCarthy et al., 2015;McLennan & Asiimwe, 2016;McLennan et al., 2021;McLennan, 2008). Deforestation in this landscape, which is known as the "Budongo-Bugoma corridor," has been extensive (i.e., most unprotected forest was logged and converted to other land uses since the 1990s; Twongyirwe et al., 2015). Hunting chimpanzees for their meat is taboo in this part of Uganda (McLennan, 2008), and can be excluded as an effect on nesting behavior (cf. Last & Muh, 2013;Tagg et al., 2013). Therefore, this region is ideal for examining the effect of deforestation and general human disturbance on chimpanzee nesting patterns. In previous studies of nesting in the Budongo-Bugoma corridor, forest degradation and clearance were suggested to be the cause of a high frequency of chimpanzee nests in exotic trees (especially Eucalyptus sp., McCarthy et al., 2017;McLennan et al., 2021), as well as a high frequency of integrated nests (McCarthy et al., 2017;McLennan, 2018).
The aim of our study is to examine the effect of forest clearance, and a community decline, on chimpanzee nesting behavior in the Bulindi chimpanzees, one of the chimpanzee communities inhabiting the Budongo-Bugoma corridor. This study differs from previous studies because it compares nesting behavior before and after major forest clearance in one community of chimpanzees living in fragmented forest surrounded by agricultural land, providing no opportunities to retreat into intact forest. Previous studies on the effects of forest disturbance (mainly logging) often involved surveys of nest densities, but not nest characteristics, in larger forests harboring multiple communities of chimpanzees (cf. Arnhem et al., 2008;Morgan et al., 2018;Plumptre & Reynolds, 1994;White & Tutin, 2001). Deforestation preceded by logging has been ongoing in Bulindi since at least the 1990s. However, forest disturbance peaked between 2007 and 2014, when about 80% of the riverine forest in the chimpanzees' home range was converted entirely to agricultural land . Over this same timeframe the chimpanzee community also decreased by approximately 20% (a conservative estimate because not all community members were identified at the start of the study; McCarthy et al., 2020). We compare chimpanzee nest characteristics before (2006)(2007), "period 1") and after (2014-2015, "period 2") this period of major forest clearance. We make the following predictions about changes in the chimpanzees' nesting behavior: i) Because tree diversity is expected to decline following a largescale reduction in forest area (where tree species composition is spatially heterogeneous, as at Bulindi; McLennan & Plumptre, 2012;McLennan, 2010), the diversity of tree species used for nesting will be lower in period 2 compared to period 1. This will also result in a different (more limited) choice of tree species for nesting in period 2.
ii) Due to the disappearance of many large trees during logging and forest clearance (McLennan & Plumptre, 2012), chimpanzees will build their nests in shorter trees with a smaller DBH in period 2 compared to period 1, and thus nest height will also be lower in period 2.
iii) Due to an absence of nonhuman predators and hunting by humans in Bulindi, ground nesting by chimpanzees is expected in both periods. However, increased human activities around forest patches after forest clearance might lead to an increase in local people entering the forest at unpredictable times. Therefore, ground nests should be less common in period 2 because chimpanzees are expected to avoid building nests on the ground in diminished areas of forest frequented by villagers. iv) Due to the large-scale reduction in forest area available for nesting, there will be fewer suitable or preferred nesting trees leading to a greater proportion of reused nests in period 2. v) Due to the disappearance of many large trees during logging and forest clearance (McLennan & Plumptre, 2012), integrated nests, built using more than one tree, will be more common in period 2, since smaller trees may not be sturdy enough to support a chimpanzee's weight by themselves. vi) Since most forest was converted into agricultural land after period 1, chimpanzees will build a larger proportion of their nests in exotic tree species in period 2.
vii) Nest group size and the number of nests constructed in one tree will decrease in period 2 as a result of a decline in community size between periods and the disappearance of many large trees capable of supporting multiple nesting chimpanzees. Alternatively, nest group size and the number of nests in one tree might increase in period 2, if chimpanzees nest more cohesively due to the smaller available habitat, including fewer suitable nesting trees, and/or a need for enhanced safety because of increased human encroachment.

| Study site
Data were collected in Bulindi (1°29ʹN, 31°28ʹE) in Hoima District, western Uganda, situated midway between the Budongo and Bugoma Forests. Outside these two forest reserves, the land is densely populated with >150 persons per km 2 ; however, unprotected forest occurs along rivers and Cyperus papyrus swamps. Since the 1990s, forest throughout the "Budongo-Bugoma corridor" was logged for timber and converted to farmland Twongyirwe et al., 2015), leaving only small patches of forest.
Nevertheless, chimpanzees survive in this human-dominated landscape, which covers about 1000 km 2 , using remnant forest fragments and agroforestry plantations amidst farmland and villages (McCarthy et al., 2017;McLennan et al., 2021;McLennan, 2008). A genetic census estimated a regional population of 260-320 chimpanzees in the Budongo-Bugoma corridor, in nine or more communities (McCarthy et al., 2015). The Bulindi chimpanzees are one of these communities.

| Data collection
The data collected for this study were divided into two "periods": between October 2006 and December 2007 (corresponding to "Period 1," before major forest clearance) and between January 2014 and December 2015 ("Period 2," after major forest clearance). A similar proportion of nests were recorded in wet months (>100 mm rainfall in most years) in period 1 (64%) and period 2 (72%), with remaining nests recorded in dry or transitional months; for information on climate at Bulindi, see McLennan, Hasegawa, et al. (2017). In both periods, nest data were collected in morning hours. Nests were located based on where chimpanzees were heard vocalizing, or were found opportunistically while searching for chimpanzees, nests and fecal samples in forest patches (McLennan, 2010(McLennan, , 2018. Only fresh nests were considered in this study. Fresh nests were <2 days old, characterised by having only green and healthy leaves, typically with urine or dung below. Recent (with wilted, green to brown leaves, between 2 days and 2 weeks old) and old nests (only brown, dried leaves) were excluded for this analysis. After locating a fresh nest, we searched the area to locate all nests judged to have been constructed at the same time. In both periods, a "nest group" was defined as the number of same-aged nests found within 30 m of the nearest nest (Furuichi et al., 2001;Mulavwa et al., 2010). Nest group size was not determined if a thorough search was not possible (e.g., due to extremely dense vegetation or if nests were built above water), if there was reason to suspect a collection of nests was built over two consecutive nights, or if there was uncertainty regarding reuse of older nests. We recorded the locations of nests with a handheld GPS (Figure 1).
Although chimpanzees were habituated by period 2 and were more likely to be located near or at a nest site compared to period 1, F I G U R E 1 Map of Bulindi in Hoima District, western Uganda (inset), showing the distribution of nests recorded in this study: red circles = Period 1 nests, 2006-2007; blue triangles = Period 2 nests, 2014-2015 (map generated from ESRI basemap imagery, 2017). The majority of nests were built in the degraded riverine forest that forms a "Ɔ" shape at center; the surrounding matrix is comprised of smallholder farmland, exotic timber plantations, and village areas. Nests were less widely distributed in Period 2 because 80% of forest had been converted into farmland since Period 1 (e.g., riverine forest patches in the eastern portion of the chimpanzees' range were cleared completely; McLennan et al., 2020). The white polygon indicates the limits of the chimpanzees' home range, which is divided by a main road, visible at center nests were searched for and recorded after chimpanzees departed the site; therefore the identity of the builder of a nest was rarely known and we made no inferences about nest group size in period 2 from the number of individuals observed in morning parties. A recent study of day-nest building at Bulindi found that the chimpanzees also build day nests for resting on most days, and these are sometimes indistinguishable from night nests (Cibot et al., in prep.). Therefore, day and night nests were not explicitly differentiated in either period.
Whether forest clearance influenced day nesting behavior in the chimpanzees is unknown; however, we assume that the majority of nests recorded in both periods were night nests, as indicated by the presence of dung and urine below.
The following nest characteristics were recorded using identical methods in both periods: (i) Tree/plant species used; (ii) Tree height, measured with a clinometer and rangefinder (as described in McLennan & Plumptre, 2012); tree height was not recorded in rare instances when nests were built in climbers; (iii) Nest height (measured to the basal aspect of the nest with a clinometer and rangefinder; height of very low nests was sometimes estimated). Tree and nest height data were not recorded for a subset of nests in period 2 because of equipment malfunction (see Table S1); (iv) Nest tree DBH, measured at 1.3 m or above buttresses; tree DBH was not recorded for nests in strangling figs or nests lacking a measurable supporting stem (such as nests built in clusters of immature palms or climbers; McLennan, 2018); (v) Whether or not an older nest was reused; (vi) Whether or not a nest was integrated (i.e., constructed from ≥2 trees/plants, excluding nests with minor integration of climbing plants). For integrated nests using >1 species, we identified the "main" tree species as the species providing the dominant support and/or structure for the nest; (vii) The number of same-age fresh nests in the tree (i.e., assumed to have been built at the same time).
The sample size of nests in each period for which each measured variable was recorded is given in Table S1. Some aspects of nest structure, including integrated nests, were published previously by McLennan (2018)

| Diversity of nesting trees
We used the Shannon diversity index and the Morisita-Horn (MH) index to assess potential changes in the diversity and composition of trees used for nesting in period 1 and 2 (Magurran, 2004). The Shannon diversity index (H') was calculated for each period using the following equation: here, p i is the proportion of nests constructed in species i. The Shannon diversity index takes into account both species richness (number of species used) and species abundance (number of nests per species). A higher value of H' in either period indicates a greater diversity of tree species used for nesting. To assess compositional similarity among tree species used for nesting between periods, the MH index was calculated using the following equation: where N a is the total number of nests in period 1; N b is the total The index returns a value between 0 and 1, where 0 indicates no similarity (i.e., chimpanzees used completely different species for nesting in periods 1 and 2) and 1 indicates total similarity (i.e., chimpanzees used the same species for nesting and at similar frequencies in both periods).
Results of the Shannon diversity index and MH index provide a comparative measure of selection of nesting tree species between periods, where chimpanzees may choose to nest in the same individual tree more than once. Thus, the results do not compare actual species diversity between periods, although a higher diversity index for nests might be expected to reflect higher forest diversity.

| Statistical analysis
To test for overall differences in nest height, and height and size (DBH) of nesting trees between period 1 and 2, three Mann-Whitney U tests were performed (one for each variable). We also tested for differences between periods in nest height, and height and DBH of nesting trees within tree species using Paired Wilcoxon tests. Only tree species with a minimum of five recorded nests in both periods were included in this analysis (Table S2).
To test if frequencies of nest re-use, integrated nests, and use of exotic tree species for nesting differed between period 1 and 2, χ 2 contingency tests were performed using observed frequencies in each period.
To test if nest group sizes differed between period 1 and 2, a Mann Whitney U test was performed. A second Mann Whitney U test was performed to test for a difference between periods in the number of fresh nests that were constructed in a single tree.
Chimpanzee community size was larger in period 1, including more VAN DIJK ET AL. nest tree height: U = 40, p = .232, n = 10 species; nest tree DBH: U = 55, p = .233, n = 12 species). Of 10 tree species in the sample with tree and nest height data available from both periods, average nest height decreased in six species and increased in four species between period 1 and 2 ( Figure 2a). Of those same ten species, average nest tree height decreased in seven species and increased in three ( Figure 2b). Finally, of the twelve species in which DBH of nest trees was measured in both periods, eight decreased in average DBH and four increased in average DBH (Figure 2c).

| Reused, integrated nests and nests in exotic trees
The frequency of reused nests increased from 4.2% of nests in period 1% to 7.6% of nests in period 2 (χ 2 contingency test, χ 2 = 4.59, p = .032; Figure 3). There was no significant difference in the frequency of integrated nests between period 1 (19.8% of nests) and 2 (17.0% of nests) (χ 2 contingency test, χ 2 = 1.19, p = .28; Figure 3). F I G U R E 2 Comparison of average nest height (a, n = 10 species), nest tree height (b, n = 10 species), and nest tree DBH (c, n = 12 species) in individual tree species used for nesting in periods 1 and 2 (results of Mann-Whitney U test). Only species with at least five recorded nests in both periods were included in the analysis (see Table S2). Green lines indicate species in which nest height, tree height, or tree DBH decreased between periods 1 and 2 (as expected), whereas black lines indicate species in which nest/tree height or DBH increased between periods (against expectation). DBH, diameter at breast height VAN DIJK ET AL. | 7 of 14 χ 2 = 13.08, p < .001; Figure 3). In period 1, the exotic species used were cocoa (27 of 28 nests in exotic trees) and mango Mangifera indica (one nest). In period 2, six of seven nests in exotic trees were in mango trees, while one was in a jackfruit Artocarpus heterophyllus tree.

| DISCUSSION
To our knowledge, this study is the first to compare nesting characteristics in one community of chimpanzees before and after major forest clearance (80% reduction in forest area over 7-8 years; McLennan et al., 2020), when the chimpanzees had no opportunity to retreat into other undisturbed forests. Following this major habitat disturbance, chimpanzees in Bulindi showed some adjustments to their nesting behavior by building nests at lower heights in shorter trees, and by reusing nests more often. Furthermore, cohesiveness of nesting parties-as indicated by the size of nest groups and the number of nests built in one tree-increased after forest clearance, in spite of a decline in community size over the same period (McCarthy et al., 2020). Conversely, the chimpanzees continued to select most of the same tree species for nesting (especially the two most preferred species), constructed integrated nests at a similar frequency, and actually nested less frequently in exotic tree species following forest clearance.
Contrary to our first prediction, the diversity of trees used for nesting was only slightly lower in period 2, and there was a high compositional similarity in the overall choice of tree species for nesting between period 1 and 2. This pattern is similar to the changes in the Bulindi chimpanzees' diet during the same two periods, which were also relatively minor considering the extent of forest loss . Nesting tree selection was overall independent of tree species abundance in period 1 (Supporting Information). We predicted that the diversity of species used for nesting would be lower in period 2 because species composition at Bulindi varied spatially before fragment clearance (McLennan & Plumptre, 2012;McLennan, 2010). The loss of such a large proportion of forestincluding most forest on well-drained soils, which was more species-rich than swamp forest (McLennan, 2010)-was therefore expected to result in reduced tree diversity. However, since F I G U R E 3 The percentage (y axis) of reused nests, integrated nests, and nests in exotic tree species (x axis) in period 1 (grey bars) and period 2 (green bars); *p < .05, ***p < .001. NS, nonsignificant F I G U R E 4 Boxplots showing (a) the average nest group size and (b) the average number of same-age fresh nests in one tree (y axis) in period 1 (grey, left) and in period 2 (green, right); *p < .05, ***p < .001. Boxes show the 2nd and 3rd quartile range, whereas the whiskers at the top and bottom show the 1st and 4th quartile range, respectively. In three of the four boxplots, the first quartile range (indicated by a whisker at the bottom of the box) is not visible because the lower quartile range is equal to the minimum. The dots depict outliers a survey of tree species composition was not carried out in period 2, we can only speculate what caused the similarities and differences between the two periods. The high similarity in tree species used in both periods may reflect a strong preference for certain species.
Thus, if a preferred species was represented by fewer specimens after forest clearance, chimpanzees might nest in those remaining trees repeatedly. While we did not explicitly study the chimpanzees' use of individual trees over time, qualitative observations suggested they indeed nested in many of the same individual trees repeatedly throughout period 2, such as several large specimens of P. microcarpa Not all differences in nest tree selection can be explained by assumed changes in the availability of a tree species. In period 2, chimpanzees built 5.5% of their nests in several mature Khaya sp.
trees (mahogany, a valued timber species), but no nests in Khaya were recorded in period 1. These Khaya trees occurred in one small area of forest and were available to the chimpanzees in period 1; however, the chimpanzees rarely nested in this particular location during period 1. Possibly, the importance of this location as a nesting site for the chimpanzees increased in period 2 because other preferred forest areas had been cleared.
The average height of nests and nesting trees decreased in period 2, as expected (prediction 2), but tree size (DBH) did not. The removal of many tall trees during forest clearance probably explains the decrease in average nest and tree height between periods, but not why DBH stayed roughly the same. In period 1, Parkia filicoidea, Albizia spp., and Morus mesozygia were the tallest trees that chimpanzees used for nesting, with tallest specimens reaching 40 m. In period 2, the largest tree species used for nesting was P. microcarpa.
This species is not a timber tree and thus large specimens remained in the diminished fragments after forest clearance. The biggest specimens of P. microcarpa reach a large diameter size but rarely exceed 30 m in height. This probably explains why average DBH of nesting trees remained similar in both periods, while nest and tree height declined. Conversely, there was no significant decrease in nest and nest tree height between period 1 and 2 when tree species were compared individually. While most species showed the expected decrease in nest and tree height, several did not. Inevitably, following fragment clearance fewer individuals of most tree species were available in the habitat; qualitative observations suggested the chimpanzees nested repeatedly in a small number of large specimens of certain species (e.g., Lovoa trichilioides and P. microcarpa; McLennan, personal observation).
Contrary to our third prediction, we recorded only one ground nest in period 1 and none in period 2, meaning that ground nests accounted for only 0.01% of all nests in our study. Although the forest area was much larger in period 1, extensive human activity was already underway; in particular, teams of timber cutters were harvesting trees and were camped in the forest in some areas (McLennan & Hill, 2013 Human disturbance has been shown to influence ground nesting in other populations of chimpanzees, where terrestrial nesting may be altogether absent (like at Bulindi) or occurs predominantly in dense or swampy areas difficult to access for people (Hicks, 2010;Last & Muh, 2013;Tagg et al., 2013). Elsewhere in the Budongo-Bugoma corridor ground night nests accounted for 1.2% of nests (McCarthy et al., 2017). Why the frequency of ground nesting should differ between Bulindi and nearby communities is unclear; however, social or "cultural" factors, in addition to habitat and anthropogenic factors, may influence ground nesting behavior in chimpanzees (Hicks, 2010;Tagg et al., 2013).
As expected, the chimpanzees reused nests more often after largescale forest clearance (prediction 4). The frequency of nest reuse at Bulindi in period 1 (4.2% of nests) was similar to that reported elsewhere in the Budongo-Bugoma corridor (4. 0%, McCarthy et al., 2017), but had increased to 7.6% of nests by period 2 ( Figure 6). An 80% decrease in forest area from periods 1 to 2 clearly led to a large reduction in available trees .
When fewer (suitable) trees and thus fewer fresh leaves are available, chimpanzees are more likely to reuse nests (Fruth & Hohmann, 1996;McCarthy et al., 2017). Additionally, as noted above, qualitative observations suggested the chimpanzees nested repeatedly in certain individual trees in period 2, which may be expected to promote nest reuse. Chimpanzees of the Sonso community in Budongo Forest, a large forest reserve 25 km north of Bulindi, also reused a large proportion of their nests. However, this seems to have been related to the relatively large number of chimpanzees with limb injuries from snares, who may experience difficulty building new nests (Plumptre & Reynolds, 1997). In contrast, none of the chimpanzees in Bulindi were handicapped by snare or trap injuries in period 2.
Nest integration was also relatively high in Bulindi compared to elsewhere in the Budongo-Bugoma corridor ( cacao (cocoa) trees after period 1. In most forested habitats integrated nests account for ≤10% of chimpanzee nests (Fruth & Hohmann, 1996 frequently in the same tree as others in the nesting party; Figure 6) as a consequence of the large decrease in suitable habitat, that is, forest.
While nests were distributed more widely across the chimpanzees' range in period 1 (Figure 1) Riley et al., 2013). Thus, the chimpanzees' increased intake of cultivated foods could have reduced feeding competition and travel costs associated with searching for dispersed food sources, allowing for larger foraging (Chapman et al., 1995) and also nesting parties. In support of this, Kalinzu chimpanzees in southwest Uganda nested in larger groups when food availability was high (Furuichi et al., 2001).
Finally, the reduced community size at Bulindi-including fewer mature males (McCarthy et al., 2020)-may have acted in concert with the ecological changes to increase nesting cohesion. When community size declined substantially in Taï National Park, Côte d'Ivoire, the chimpanzees formed larger, more cohesive parties (Lehmann & Boesch, 2004). Larger parties could increase group safety (Lehmann & Boesch, 2004), because small communities with fewer mature males for defence are at greater risk from predators or rival groups (van Schaik & Hörstermann, 1994). Although chimpanzees at Bulindi do not encounter natural predators or rival chimpanzee communities, their interactions with local people are frequently agonistic (McLennan & Hill, 2010. We hypothesize that human disturbance may have had a similar effect on promoting cohesion at Bulindi following a decline in community size and number of mature males, which is potentially reflected in the greater cohesiveness of nest groups in period 2. However, additional data-for example on the size, duration and composition of daytime partiesare needed to establish if chimpanzees at Bulindi show high sociality generally (cf. Lehmann & Boesch, 2004).
Despite experiencing major habitat change (conversion of riverine forest to farmland), chimpanzees in Bulindi continue to survive in an extensively human-impacted environment. Chimpanzees in Bulindi have already been shown to adjust their feeding behavior flexibly in response to major forest loss .
Our current study shows that these chimpanzees, unable to retreat into undisturbed forest, are also flexible in aspects of their nesting behavior, potentially enabling them to adjust to the changing conditions. Subsequent to this study, most landowners in Bulindi  et al., 2018). Conserving chimpanzees and other wild primates in unprotected human-modified landscapes requires long-term integrated approaches that reduce threats to primate survival, and combine habitat conservation and restoration with locally appropriate conservation incentives and livelihood support for local residents.

ACKNOWLEDGMENTS
We thank the Uganda Wildlife Authority (UWA) and Uganda National We also thank Anne-Marijke Schel for feedback on a former version of this paper.