Using behavioral studies to adapt management decisions and reduce negative interactions between humans and baboons in Cape Town, South Africa

Understanding the behavioral ecology of wildlife that experiences negative interactions with humans and the outcome of any wildlife management intervention is essential. In the Cape Peninsula, South Africa, chacma baboons (Papio ursinus) search for anthropogenic food sources in both urban and agricultural areas. In response, the city of Cape Town and private farmers employ “rangers” to keep baboons within the Table Mountain National Park. In this study, we investigated the success of rangers' intervention in keeping baboons in their natural habitat. Based on our findings in year one, we recommended adjustments to the rangers' management strategy in year two. We recommended improved consensus of actions toward baboons (that is, when/where to herd them), and the construction of a baboon‐proof fence around one of the farms that provided a corridor to urban areas. During the 2 months following recommendations, these interventions combined resulted in a significant reduction in the time baboons spent in both urban and agricultural land. Our case study illustrates the importance of integrating research findings into ongoing management actions to improve both human livelihoods and baboon conservation through an adaptive management framework. We expect similar approaches to be beneficial in a wide range of species and contexts.


K E Y W O R D S
bio-logging, crop guarding, crop-foraging, fencing, home range, human-wildlife conflict mitigation, primate, raiding frequency, social sciences, space use

| INTRODUCTION
With an expanding human population that is encroaching on natural landscapes, negative interactions between people and wildlife are increasing. Such interactions are more marked when wildlife searches for and consumes food resources in farmlands (Warren et al., 2007;Webber et al., 2011) and urban areas (Contesse et al., 2004;Yeo & Neo, 2010). Crop and urban foraging wildlife can result in severe economic losses for people because of the damage they cause to crops and infrastructure (Tavolaro et al., 2022) contributing to negative human-wildlife interactions and feelings of insecurity by people, especially when large mammals or carnivore species forage in human spaces (Soulsbury & White, 2016). For wildlife, these interactions can pose significant welfare costs and threaten populations of endangered species (Chan et al., 2007;Hockings et al., 2015). For example, in Venezuela, 38% of human-caused death of jaguars (Panthera onca) were due to retaliatory killing after livestock depredation, leading to local extirpation of jaguar populations (Jędrzejewski et al., 2017).
Multiple social factors determine human interactions with wildlife, including cultural beliefs (Bennett, Roth, Klain, Chan, Christie, et al., 2017;Dickman, 2010;Manfredo et al., 2009) and the history of human-wildlife interactions (Cerri et al., 2017;Kubo & Shoji, 2014). Together these factors may influence perceptions of the actual costs and risks associated with interactions (Melzheimer et al., 2020;Naughton Treves, 1998) leading to a potential mismatch between conservationists' recommendations, managers' interventions, and people's perception of the outcomes of these interventions (Dickman, 2010). While social factors are key to understanding these interactions and implementing new management strategies with diverse stakeholder approval, they are only rarely considered in conservation biology . This is in part due to poor dialogue between the different parties, including managers and researchers, decision-makers, and the public (Cook & Sgrò, 2018;Durant et al., 2019;Greggor et al., 2016).
Baboons represent one of the most challenging wildlife species to manage in agricultural and urban landscapes because of their flexible foraging and locomotion strategies, cognitive skills, agility, and dexterity (Hill, 2017). To prevent baboons' access to crops and urban areas, various strategies have been employed, including translocation or removal of "problem" individuals (Strum, 2005), using high tensile electric fences to protect farms (Kaplan, 2013) and various forms of "guarding", where people prevent baboons from foraging in urban or farmlands (Schweitzer et al., 2017;van Doorn & O'Riain, 2020). One high-profile human-baboon interaction occurs in the Cape Peninsula, South Africa, where chacma baboons (Papio ursinus) crop-and urban forage near to and within the City of Cape Town (Hoffman & O'Riain, 2012a;Kaplan et al., 2011;van Doorn et al., 2010). In response, the city of Cape Town and farmers contract "rangers" who use shouts, whistles, and paintball guns to "herd" baboons away from farmland and urban spaces (van Doorn & O'Riain, 2020). While these interventions are largely successful , the efficacy of nonlethal aversive conditioning methods tends to decrease over time because of habituation (Found et al., 2018;Mazur, 2010;Petracca et al., 2019). Moreover, because the baboons range over various lands/properties, coordination and consistency in methods used to deter baboons are difficult to achieve. We propose an adaptive management approach in which a study of the baboon's behavioral ecology can be used to support management's operational objectives.
Here, we report a case study using behavioral studies to adapt management decisions and reduce negative interactions between humans and baboons focusing on a baboon troop living in the Constantia region of Cape Town. Our aim was to provide baboon behavioral and movement data to ensure that the effects of management measures are evaluated and adjusted to improve the success of rangers at deterring baboons or propose alternative approaches where success is poor. We compared baboon behavior and movement patterns to the management objectives of rangers over two consecutive years. Following completion of our first year of study, we communicated our findings to the landowners and managers of the rangers. We suggested changes that we considered likely to improve their effectiveness in deterring baboons from agricultural and urban land uses. We then assessed the outcome of these changes in year two by repeating the methods in year one and comparing baboon space use and behavior between years.

| Focal baboon troop
We studied one troop (called "Constantia troop") for two consecutive field seasons (in 2014 and 2015) from March/ April (year one/year two) to July (late autumn-early winter) when baboons in the Cape Peninsula are known to engage more in urban-foraging (van Doorn et al., 2010). The troop comprised approximately 60 individuals. In year one, it was composed of 10 adult and 3 sub-adult males, 20 adult and sub-adult females, and approximately 30 juveniles. In year two, the troop was typically split into two subtroops; one which comprised 9 adult males and 2 sub-adult males, 13 adult and sub-adult females, and approximately 20 juveniles; the other composed of 2 adult males, 9 females, and approximately 10 juveniles. There was a total of the 17 troops of the Cape Peninsula at the time of the study, 12 of which routinely engaged in urban and crop foraging (Hoffman & O'Riain, 2012b;Richardson, 2015) with the remaining troops living in a protected area with no urban or agricultural land use. The study troop was one of only five troops in the region that had access to both urban and agricultural land uses (mostly vineyards) on the Peninsula. The City Council of Cape Town had contracted a professional service provider to deter the baboons from all urban areas. Depending on troop size, 2-5 field rangers monitored troops from sunrise (7 a.m.) to sunset (5 p.m.) every day of the year. Vineyard managers affected by the study troop (Farms A, B, and C) employed their own field rangers who worked similar hours and used similar tools.

| Study area
The focal troop ranged in the northern region of the Cape Peninsula (S À34.0349, E 18.4156) within a matrix of indigenous vegetation (fynbos), exotic trees (acacia, pine, and eucalyptus spp), meadows dominated by annuals, vineyards and urban residential areas ( Figure 1) . Vineyards were owned by three private wine farms (A, B, and C, Figure 1) and consisted of planted vines, which had been harvested in March. Urban habitat in the area included a variety of low-density residential and commercial (e.g., restaurants and light industrial) properties.
We divided the area baboons ranged within into 150 Â 150 m grid cells (total = 22,500 m 2 cells). This grid size is larger than the average spread of baboon troops within the Cape Peninsula (Hoffman & O'Riain, 2012a) and elsewhere in South Africa (Henzi et al., 1992) and is, therefore, representative of land use at a troop level. For each cell, we assigned a habitat type (fynbos, trees, meadows, vineyards, or urban), in accordance with the dominant land cover identified using Google Earth imagery (accessed in July 2015) and verified with field observations.

| Baboon management
Baboons were deterred from exploiting urban areas and vineyards by rangers using noise, physical presence, and paintball guns (Cape Nature, 2012). Rangers cooperated in their efforts to deter baboons, but those hired by the City of Cape Town's service provider focussed on preventing baboon's presence in urban areas, while those hired by farms prioritized keeping baboons away from vineyards and the associated houses and infrastructure. In year one, two teams of five field rangers were employed to work on alternate days. Within each team, three rangers were employed by the City's service provider, and two rangers were employed by Farm B. During year two, two teams of four rangers were employed; in each team, two rangers were hired by the City's service provider and two by Farm B. A fifth ranger, working every day, was employed by Farm C and cooperated with the team when baboons were ranging in Farms B or C. Additionally, workers at Farm A (numbers varied but most frequently teams included 10 people) were directed to use noise and paintball guns to deter baboons from Farm A. They were not dedicated to deterring baboons full-time and never worked in collaboration with the ranger teams across the whole area. Rangers hired by the service provider of the City of Cape Town were occasionally accompanied by their field manager in both years of the study.

| Rangers' management strategy
We assessed the rangers' management strategy using anonymized individual interviews where rangers were asked, in their opinion and regardless of their motivation, where the baboons were allowed to roam from March to August, after the grape harvest. In each interview, we started by checking that the field rangers could orientate on a map of the study area: each ranger was asked to point out specific landmarks on the map. Rangers were then tasked with coloring in areas where the baboons were allowed to be at any time (green; score 0), some of the time (orange; score 1), or never (red; score 2). In year one, we interviewed the two teams of five rangers and their field manager (n = 11), and in year two, the two teams of four rangers and their field manager, the one field ranger from Farm C and the 10 farm workers from Farm A (n = 20). Interviews were conducted once each year, at the end of each field season with the written consent of both employers and the field rangers, and the approval of the Swansea University Ethics Committee (Approval No: SU-Ethics-Staff-151121/411). Interviews were anonymized and did not require any personal information.
We estimated "space restriction" or "deterrence," overlaying our grid cells to the interview maps and computing an average score (from 0, 1, or 2; see above) for each cell . High scores in a given cell, therefore, indicate that a baboon would be highly likely to be herded away, while low scores indicate that baboons would not likely be herded away. In addition, we assessed the level of "management agreement" by calculating the Simpson's diversity index, D (Simpson, 1949) to express the probability of two field rangers selected at random giving the same score for a specific grid cell, as: where D is computed for each cell, N is the total number of field rangers, and n i is the number of field rangers scoring a given cell with the score i (0, 1, or 2; chased all of the time, sometimes, or never).
F I G U R E 1 Map of the study area at the edge of the City of Cape Town, South Africa (inset). The map is colored by habitat type and shows the different land uses. The fence, designed to keep the baboons from entering vineyard farming areas, is indicated in black; the solid line represents the part of the fence which was live across the full study period, while the dashed line represents parts of the fence that were newly erected (South) in year two. The fences surrounding Farm C and the northern edge of Farm B were not operational. They were therefore not represented here. The solid gray lines represent the delimitation of each land property.

| Fence
Before the start of the study, the three farms had erected fences along most of their boundary with the national park to restrict both human and baboon access. Fences were 1.8 m high with multiple strands of electric wiring to restrict climbing. Farm A's fence included an impermeable wire mesh fence and an anti-climb overhang section of electrified wires on the side of the national park. The fences of Farms B and C had no mesh fencing component and no anti-climb overhang. The fences of Farms A and B had been damaged by falling trees following a fire. The fence of Farm C was not operational throughout the study and baboons routinely passed over or through the fence.

| Troop space use and behavior
The study troop was habituated to direct observation for 5 weeks before the study in year one. All adult individuals were identified via physical characteristics or ear tags (adult males were tagged as part of Cape Town's baboon management plan). Observations were conducted by one or two observers for 3-4 days per week between the 20th of April and the 1st of July in year one and year two, resulting in 33 days of observations in year one and 35 days in year two. We observed the troop from dawn to dusk when the baboons came down from their sleeping trees and until they returned to their sleeping sites in the evening. Observations were normally made at a distance greater than 10 m and in accordance with fieldwork procedures described in the guidelines for the treatment of animals in behavioral research and teaching (Animal Behavior, 2012, 83: 301-309).
We conducted scan sampling at 30-min intervals, recording the number of adults in sight and their respective activities (resting, traveling, grooming, foraging). At each scan, the troop's location was recorded using a handheld GPS device (eTrex 10, Garmin Ltd) with the observer positioned at approximately the center of the troop (Hoffman & O'Riain, 2010). We discarded a posteriori scan samples when fewer than three baboons were in sight (n = 355 GPS positions in year one and n = 384 GPS positions in year two).
We estimated the time budget of the troop by calculating the proportion of individuals observed foraging, resting, traveling, or grooming. We estimated troop home range using the 95% fixed kernel density estimator with the "adehabitat" package, function "getvolumeUD," (Calenge, 2006) in R (R Core Team, 2019). We selected the smoothing parameter ad-hoc for year one and kept the same value for year two (Worton, 1989). We then assigned each 150 x 150 m grid cell within the troop range an intensity of baboon use (scaled between 0 and 100, with 0 representing the core area of the home range, based upon the utilities for home-range size estimation).

| Individual space use and behavior
To detail the behavior of urban foraging individuals, we focussed on males, which tend to have the highest propensity to engage in urban foraging (Schweitzer et al., 2017;Strum, 2010), using a combination of direct observation and collar data. For our direct observation data, we conducted 30-min focal observations from the 20th of April to the 1st of July each year. Observers rotated randomly between individuals to sample each individual at different times of the day (year one: N = 324, 32.4 ± 1.3 focal sessions per male; year two: N = 173, 19.3 ± 2.6 focal sessions per male). We recorded the individuals' behavior each minute, classified as either resting, grooming, foraging, or traveling. Time budgets were then calculated for each male in each year, as the total proportion of behavioral observation of each behavioral category.
To provide detailed data on space use and foraging, which is particularly challenging to observe directly in urban areas and farmland, we used self-manufactured tracking collars (full details are given in Fehlmann, O'Riain, Hopkins, O'Sullivan, et al., 2017) containing GPS (recording 1 fix every 5 min) and acceleration dataloggers (recording at 40 Hz). In year one, collars were less than 3% of baboon's body mass. In year two, we minimized battery size by limiting data collection to 1 month, resulting in a collar with less than 2% of baboon's body mass. Collars were approved for use by Swansea University Ethics Committee (Swansea University IP-1314-5).
We fitted eight adult males out of 10 in the troop in year one, and 10 out of 12 in year two (see Table S1 for more details). Baboons were cage-trapped individually, in accordance with the capture and collaring protocol developed by the Baboon Conservation Authorities and the Baboon Technical Team, which is responsible for devising management strategies to reduce negative interactions between people and baboons on the Peninsula (www.baboons.org.za). We used baited cages (corn kernels), that were triggered remotely by the observer. Once in the cage, a veterinarian sedated the baboons using a combination of ketamine and medetomidine, and collars were fitted. Baboons were released after 3 h following full recovery from sedation, and they returned to their troop. We did not encounter any complications during this process. All collars were retrieved in July each year (in year one by re-trapping, in year two by drop-off mechanisms). In year one, two collars failed to record data decreasing the sample size to six individuals. In year two, one male dispersed, and two other males formed a sub-troop with a group of females moving out of the main troop's home range; we did not use the data from these three males in our comparisons (see Table S1 and Figure S1 for details).
We used GPS fixes from the collars to estimate male space use in relation to urban areas (as distances to the urban edge) and with respect to the rest of the troop (2014: N = 1054 (± 302) fixes per baboon; 2015: N = 2937 (±1160) GPS fixes per baboon). Acceleration data were used to assign baboon behavior at each GPS fix, using video-labeled acceleration data and machine learning methods as detailed in Fehlmann, O'Riain, Hopkins, O'Sullivan, et al., 2017. This meant we had each collared baboon's position and behavior, once per second while wearing the collars, thus providing information on the likelihood of males foraging within different areas. Due to the differences in the collaring times between the 2 years (Table S1), we cross-checked foraging time budget estimation from collar data with focal observation data, in order to identify any potential sampling bias.

| Negative human-baboon interactions
The city of Cape Town's service provider established a "baboon hotline" which members of the public can phone to lodge a complaint about the presence and/or damage caused by baboons in their area. These data are then collated by area to provide a monthly estimate of negative interactions between each troop on the Peninsula and their neighboring community (Richardson, 2015). We used these data to compare the total number of "baboon hotline" calls in year one and year two for our study troop/area and compared this result to other troops in the Peninsula. Using recorded locations of urban foraging events, collected opportunistically during direct observations (see above), we identified urban foraging hotspots (that is, locations where foraging events were most frequently observed).

| Communication with decision-makers and management
We had established communication with the landowners and field managers prior to the onset of the study. We obtained permission to work on their properties and agreed to share our findings so that they can improve their management outcomes. We provided both managers and field rangers with regular updates on fieldwork progress, engaging in regular informal discussions about baboon behavior and the challenges of management. After preliminary analyses of behavioral and movement data gathered in year one, we formally presented the findings to the city of Cape Town's service provider and the farm managers, making recommendations to further reduce spatial overlap between baboons and both urban and agricultural land (details in results). Field rangers were not present during these formal meetings.

| Statistical analyses
We tested if there were any significant changes in the management strategies between year one and year two using generalized least square models (R, package nlme). We fitted change in "space restriction" and change in "management agreement" (score difference between years per grid cell) as our response variables. We fitted habitat type as a fixed effect to investigate if there was a focused effort to improve agreement in certain areas and controlled for landowner identity by adding it as a fixed effect. We accounted for spatial autocorrelation by fitting a spherical correlation structure (Pinheiro & Bates, 2000). We calculated the significance levels of main variables and correlation structures using log-likelihood tests and comparing models with and without the variable of interest using the "ANOVA" function.
To test the success of a buffer zone at reducing urban land use in year two, we calculated the median of distances to urban areas of both the troop and males for year one and year two. We investigated the predictors of baboons' space use over the study, using generalized least square models. We controlled for spatial autocorrelation by fitting a spherical correlation structure (Pinheiro & Bates, 2000) and used a logit transformation for the space use scores to meet model assumptions. We fitted baboon space use (data for each cell in both years) as our response variable and fitted space restriction score, management agreement score, and the number of field rangers working in an area (effort) as fixed effects. We also included habitat type (categorical), and distance to important habitat features, that is, trees, urban areas, and urban foraging hotspots as fixed effects. To test the importance of the fence on baboons' space use, we included whether the cell was inside or outside the fenced area (lands in Farm A in year two) as a fixed effect. We controlled for differences in time by including a year as a fixed effect.
Lastly, to test if our recommendations resulted in a positive change in baboon behavior (i.e., more foraging time in natural habitat); we characterized the differences in baboon space use patterns and foraging activity in year one and year two at the troop and at the individual level (males). To test for differences in space use, we used troop GPS data, comparing troop home range size between the 2 years and their composition (with respect to habitat use). This allowed us to determine whether baboons used the urban and farm habitats less (where conflict occurs) following the recommended management changes. To test for differences in behavior, we described the location of baboons foraging events and compared the overall proportion of time invested in foraging, resting, traveling, and grooming activities, using Wilcoxon (troop) and Wilcoxon signed rank tests (males). Finally, we compared the number of public complaints between the 2 years relevant to this troop in this area in relation with the other troops in the Cape Peninsula.

| Year one findings and recommendations
Full details of year one findings are presented in . The rangers were largely successful at keeping the baboons out of the urban space (only 0.3% of scans occurred in urban areas), but the troop was most frequently observed a few 100 m from the urban edge (median [1st and 3rd quartile]: 362 m [228 m-463 m]). The baboons spent most of their time (55.2% of scans) in vineyards, where they showed a preference for areas with large exotic trees, and where rangers had low levels of agreement (mean score below 0.5) on whether the baboons were permitted in those locations or not. GPS data from collared adult males revealed that they stayed closer to the urban edge than other members of the troop (median; 137 m [144 m-505 m]; details for each individual are given in Table S2), affording males the opportunity to engage in short, high-speed forays into the urban space. Most direct observations of urban-foraging incidents (89%, n = 95/107) occurred at one single location, corresponding to a wine cellar and two adjacent restaurants (Figure 1). We defined this location as an urban foraging "hotspot." Among these events, 85% were conducted by adult or sub-adult males.
Based on these findings, we made three recommendations to those tasked with baboon management: (1) to strive for consensus among rangers in which areas baboons are permitted/not permitted (i.e., achieve higher management agreement); (2) extend the no-go buffer area to at least 400 m from the urban edge which included two major sleeping sites and refuge areas, frequently used by males before or after urban foraging; (3) improve the maintenance of the fence, especially around Farm A as the troop used this farm as a corridor to urban area.

| Improved ranger strategy in year two
In year two, rangers gave a higher space restriction score of 76% grid cells compared to year one (Figure 2a, b). The increase in restriction scores varied according to habitat type (GLS: Wald-test F = 9.84, df = 4, p-value <.001, Figure 2a, b, Table 1) with the largest increases reported for vineyard habitat, where 99% of cells had higher space restriction scores in year two. The smallest increase in restriction was in urban areas, with only 12% of the urban cells scoring higher in year two (but this habitat scored highest in year one). Including landowner identity in the model improved fit (Log-likelihood test statistic = À74.27, p < 0.001) with rangers reporting higher restrictions in 98% of cells on Farm A and 100% of cells on Farm C (Table 1).
Ranger consensus on permitted/non-permitted area use, improved by a factor of 1.6 ± 0.7 (mean ± SD for grid cells) in year two compared to year one. This change in levels of agreement varied according to the habitat type (GLS, Wald-test F = 45.93, df = 4, p-value <.001, Figure 2c, d, Table 2) being highest in vineyard habitat (2.12 ± 0.49) and lowest in fynbos (0.87 ± 0.22) and urban spaces (1.04 ± 0.16) which already had high ranger agreement scores in year one. Change in agreement score from year one to year two did not differ according to the landowner identity (Log-likelihood test statistic = 4.88, p = .299).

| Maintenance of the fence
In year two the fence protecting Farm A was fixed and extended along the border with Farm B (Figure 1).

| Introduction of a "buffer zone"
In year two, the troop was typically twice as far from urban edge when compared to year one (median  Table S2 for details on individual males) suggesting the recommended "buffer zone" was successfully implemented by rangers.

| Baboons' response to improved management and fence
Baboons spent less time in areas with higher ranger agreement scores (GLS: Estimate = À1.36, Std Error = 0.48, t-value = À2.85, p = .005) ( Table 3). Model fit was not improved by adding the ranger deterrence score, the number of field rangers working in an area, the habitat category or the distance to key environmental features (Table S3). Baboons spent less time within the fenced area of Farm A in year two (GLS: Estimate = À1.77, Std Error = 0.26, t-value = À6.64, p < .001), which contributed to a significant effect of "year" on baboon space use (GLS: Estimate = 2.07, Std Error = 0.23, t-value = 9.12, p < .001). In year one, 79.7% of the fixes were inside the fenced area which dropped to 27.4% of fixes in year two. F I G U R E 2 Change in baboon management strategies (maps (a)-(d)) and baboons' responses (e) and (f). In (a) and (b) areas where baboons are likely to be deterred (higher space restriction scores) are represented by "warmer" colors, and areas where baboons are likely to be left alone are represented by "colder" colors. In (c) and (d) rangers tend to agree on a common strategy in yellow or disagree in red. (e) and (f) shows troop space use defined with kernel density estimates. The colors indicate the kernel volume, with darker areas representing more intensely used space (core areas) and lighter areas representing less used space (95% contours). Contours represent habitat features with vertical hashes representing trees, horizontal hashes representing meadows, and light gray polygons indicating urban areas. The dark gray polygon is an identified urban foraging hotspot. The red line indicates the location of the baboon fence and the orange line the buffer zone around urban areas before recommendations (e) and after (f).
T A B L E 1 Change in space restriction reported by rangers between year one and year two as a function of habitat type and landowner identity. Note: Categories are compared to Urban habitat as the reference habitat type. The significance of the correlation structure is also provided.
F I G U R E 3 Baboon foraging behavior. The distribution of foraging location for adult males (different colored line for each male) are given in year one (n = 6, (a)), and year two (n = 7, (b)). The ranging pattern of the troop is represented as a gray polygon. Distribution is represented as kernel densities using a bandwidth of 50 m.
In year two, with increased agreement, creation of a nogo buffer area, and the hardening of the rural edge with improved maintenance of the fence, the troop home range was larger, with 2.28 km 2 ( Figure 2f) and composed of 30.6% fynbos, 22.9% forested areas, 5.7% meadows, 40.1% vineyards and 0.7% urban. This change between years represented a significant difference in troop habitat use (Chi-squared test: X 2 = 53.107, df = 4, p-value <.001).
While in year one the troop stayed in vicinity of the urban areas, foraging in the urban area was recorded in only 0.5% of scans and most foraging actually occurred in vineyards (57.9%). Only 0.5% of scans involving foraging occurred in fynbos. In year two, most foraging still occurred in vineyards (51.5%), but the troop was never observed foraging in the urban environment and fynbos foraging increased to 21.3%. With the troop and males spending less time in and close to urban areas in year two compared to year one (Figure 2, Figure 3), individual males foraged less frequently in urban areas. In year one, 2.2% of GPS locations associated with foraging occurred in urban areas, versus 0.2% in year two (collar data). Fynbos foraging increased from 0.6% in year one to 12.4% in year two, but vineyards remained the most important foraging location (55.0% and 60.3% of foraging locations occurred in vineyards in year one and two, respectively).
Direct observations of baboons showed that they spent more time foraging in year two when using scan trooplevel data (Wilcoxon test: W = 207, p = .038, Figure 4), or focal observations of males (Wilcoxon signed rank test: focal sampling data: V = 4, p = .027, Figure 4). Similar results were obtained for individual males using collar data with increased foraging in year two compared to year one (Wilcoxon test: W = 8, p-value = .037). Increased time foraging was associated with less time devoted to grooming both at the troop level (Wilcoxon test: W = 412.5, p = .011), and for individual males (Wilcoxon signed rank test À focal sampling: V = 34, p = .012). No significant changes in resting and traveling were observed nor for the troop or the individual males (Figure 4).

| Reports of negative baboon-human interactions
The number of complaints during the study period via the "baboon telephone hotline" was 32 in year one and 12 in year two. In comparison, the hotline received on average 4.5 (± 17.6, N = 17) calls less per troop across T A B L E 3 Result of the generalized least squares model to explain baboon space use over both years of study.  the Peninsula, with the focal troop experiencing the second most important decrease in the number of calls on the hotline ( Figure S2).

| DISCUSSION
We provided an independent assessment of both managing strategies and managed wildlife, combining a survey of rangers management strategies and direct observations of baboons with high-resolution remote tracking collars (Fehlmann, O'Riain, Hopkins, O'Sullivan, et al., 2017). Our approach gave an overview of baboons' adaptation to management strategies, which can be difficult for field rangers to estimate in the field, as they can typically only see baboons when they are close to the urban edge or only a few baboons at a time. This allowed us to assess the limitations of the management practices and give recommendations that did not require substantial additional costs for the managers or workload for the rangers. We thus overcame the frequently highlighted barrier to using behavioral studies for wildlife management: the lack of communication between managers and researchers, and the lack of resources (Cook & Sgrò, 2018). This is of foremost importance considering that management can act as a driver of behavioral adaptation and evolution, and therefore deeply influences the longevity of management measures and human-wildlife coexistence (Schell et al., 2021). Our recommendations, combined with the improvement of the fence, resulted in better management outcomes. More specifically, in year one, many rangers tolerated baboons on Farms A and B and only had a high agreement on preventing baboon access to urban areas. Consequently, baboons used a "sit and wait" strategy on vineyards to make high-speed forays into urban areas to obtain anthropogenic food sources. Having relayed this information to the managers we saw a substantial improvement in consensus in year two with most rangers in agreement that baboons were not permitted in vineyards ( Figure 2). This together with the creation of a buffer and improvements to the fence resulted in a 38.5% reduction in the relative use of vineyards and a 75% reduction in the relative use of urban areas. Fewer negative interactions were also reported to the baboon hotline for this area. We were not able to dissociate the relative contribution of ranger consensus and increased number of rangers in the fenced area versus the improvements to the fence. While this is unfortunate from the perspective of testing the relative efficacy of different nonlethal methods, it would be neither reasonable nor desirable to limit the "toolbox" of nonlethal methods that landowners can deploy to reduce the impacts of baboons.
Furthermore, most successful nonlethal approaches to mitigating negative interactions with wildlife require a mixed toolbox approach given the risks of habituation to aversive conditioning (Littlewood et al., 2020;Snijders et al., 2019).
Improving the longevity of mitigation tools requires understanding their limitations. The rangers typically attempted to "hold the line" a common and successful guarding strategy used for baboons on the Peninsula (van Doorn & O'Riain, 2020) and to deter elephants from entering crop (Gross et al., 2019). This strategy allowed rangers to maintain a larger buffer zone without increasing their workload here, a 400 m buffer zone actually resulted in a smaller perimeter than a 200 m buffer (21,222 m vs. 22,974 m, respectively). However, "holding the line" requires rangers to have good visibility, and natural bushes or dense tree patches limit their efficacy at the edge of the farm. Traditional crop guarding can have devastating consequences on people's well-being, education, and economy (Barua et al., 2012) and even professional guarding generates a high degree of fatigue (Thondhlana et al., 2020). The support of a fence can therefore be essential to make guarding more sustainable. For example, a study showed that farmers were able to reduce crop guarding by 50% when used concomitantly with a fence (Feuerbacher et al., 2021). However, spillover effects, which are particularly salient with fencing, should be considered and recognized (Osipova et al., 2018). Here, Farms B and C experienced more baboon intrusions in year two when Farm A's fence became more effective. Ultimately this pressure will require Farms B and C to upgrade their perimeter fences as baboons will constantly seek areas where the risk-toreward ratio is lowest (van Doorn & O'Riain, 2020). In this context, large-scale collaboration and cooperation should ideally develop between stakeholders (see Melzheimer et al., 2020) to avoid conflicts between affected parties (Dickman, 2010).
Despite the reduction in urban foraging, rangers did not achieve their aim of fully preventing the access to farmlands, and vineyards constituted 40.1% of baboons' home range in year two. While guarding has proven to be a particularly effective strategy to prevent crop raiding (Hill & Wallace, 2012;Hsiao et al., 2013;Karanth et al., 2013) it is well established that wild animals that are habituated to people and human-derived foods respond poorly to aversive conditioning (Found et al., 2018;Mazur, 2010). Peninsula baboons are habituated to people (van Doorn & O'Riain, 2020) and have a long association with foraging in vineyards (Hoffman & O'Riain, 2012b) which greatly reduces the efficacy of aversive conditioning in this landscape. The location of the troop's sleeping sites probably increased the difficulty of chasing the baboons away. Most GPS fixes in the vineyards are close to the main sleeping sites (Figure 2f). Baboons, like many other primates, sleep in high trees or cliffs (Fruth et al., 2018) and unsurprisingly the distribution of suitable sites strongly influences daily travel routes (Fei et al., 2022;Schreier & Grove, 2014). A further recommendation to farmers would be to prevent access to these sleeping sites, which would encourage baboons to range further away from the farm.
When baboons were prevented from accessing urban areas, they spent more time foraging and less time grooming. Food available to baboons in urban or croplands tends to be rich in energy (Fehlmann, O'Riain, Kerr-Smith, Hailes, et al., 2017;Johnson et al., 2013), locally abundant, and predictable in time and space (Hill, 2017). Urban or crop-foraging individuals, therefore, benefit from increased energetic intake allowing them to reduce the time spent foraging (Altmann & Muruthi, 1988;Strum, 2010), increase fertility (Strum, 2010) and improve survival (Beamish & O'Riain, 2014). However, urban and crop foraging is a risky foraging strategy, typically characterized by increased activity levels when ranging in human-altered environments (Fehlmann, O'Riain, Kerr-Smith, Hailes, et al., 2017;Walton et al., 2021), increased stress levels (Chowdhury et al., 2020), and high risks of injuries or death (Beamish, 2009). Urban foraging baboons also experience high risks of disease transmission to and from pets (Drewe et al., 2012), and physiological pathologies such as diabetes because of the high sugar content of the available food item (Leith et al., 2020). Urban and crop foraging therefore questions baboons' welfare; increased survival and reproduction rates but more injuries and lower physiological states, increased grooming time but fewer troop cohesion (Bracken et al., 2022), more frequent aggression and higher stress levels (Chowdhury et al., 2020). In conclusion, restricting this behavior might therefore not only be positive for reducing human-baboons' negative interactions but is also limiting the risks of potential ecological traps, as described for other large primates (Hockings et al., 2015).
Coexistence with wildlife on rural and urban edges is essential if we are to reduce biodiversity losses and improve the health and sustainability of many wildlife populations living in mixed-use areas (Cumming et al., 1997;Naiman, 1988;Naoe et al., 2016). This requires an understanding on how animals use anthropogenic resources in both urban and rural settings and then devising methods to reduce negative impacts with landowners and other stakeholders to build tolerance (Redpath et al., 2013). In this relatively simple before/after case study, we provide an example of how to embed research within an adaptive management framework. This illustrates how a better understanding of both the behavior of baboons and the goals of their field rangers can both contribute toward a win-win scenario. The management strategy we detail is specific to the studied troop and context, but the recommendations we provided should be transposable wherever wildlife and humans are interacting negatively, at the edge of croplands and urban areas (Gurung et al., 2008;Nijman & Nekaris, 2010;Takahata et al., 2014). More importantly, the approach we used, which combined behavioral ecology and sociology tools, is reproducible in any context and has great potential to significantly improve management and reduce conflicts (Bennett, Roth, Klain, Chan, Christie, et al., 2017). Several behavioral ecology projects on different species and contexts have provided interesting tools for the management of wildlife (Chiyo et al., 2011;Melzheimer et al., 2020;Schweitzer et al., 2017) and engaging local communities in conservation and management actions have demonstrated positive impacts on the acceptance of wildlife and mitigation measures (Junker et al., 2017;Sainsbury et al., 2021). It is only with the will of recognizing the multifaceted nature of wildlife and human behavior, that we will effectively bridge the gap between research and on-the-ground management, an essential step to make a significant change to the welfare of wildlife and people (Bennett, Roth, Klain, Chan, Christie, et al., 2017;Cook & Sgrò, 2018;Durant et al., 2019).

FUNDING INFORMATION
This work was supported by research grants from the Association for the Study of Animal Behavior (ASAB) and Swansea University (NE/H016600/3), and Gaelle Fehlmann was supported by a Swansea University PhD Scholarship.