Among the most important approaches to studying the effects of urbanization is the rural-urban gradient methodology. Nevertheless, most studies tend to be more varied and oversimplified when presuming linear patterns of change or difference [
34]. Urbanization leads to habitat degradation, fragmentation, and loss, often associated with biodiversity loss and significant changes in species composition [
16,
18]. A significant potential benefit of urbanization is the promotion of urban adapters and exploiters, usually exotic generalist species [
16,
19]. Invertebrates are significantly impacted by urban gradients due to their capacity to capture a wide range of urban impacts [
20,
21]. Several factors contribute to the importance of the study area, including its status as a prominent natural landmark, its status as the largest and most important valley in Riyadh, and its position in the middle of the Najd Plateau of Saudi Arabia [
29,
35,
36].
4.1. Beetle diversity
The preponderance of the family Tenebrionidae at these sites characterizes the insect fauna in arid and semi-arid environments. This result and those found previously in arid and semi-arid environments [
26,
37,
38,
39,
40,
41] both highlight a strong dominance of darkling beetles (Tenebrionidae), which indicates a highly adaptable beetle fauna. The high species richness (38.3% of total species) and abundance (60.1% of total catch) are due to this adaptation. All rural and suburban sites and 1-3 urban sites were dominated by tenebrionid species such as
A. cancellate,
M. puncticollis, and
Trachyderma philistina were found to be the most abundant. In rural and suburban habitats (98.9%), they were more abundant than in urban habitats (1.1%). A decline in their number in urban habitats may be attributed to the alteration of microhabitats as a result of urbanization [
21,
42,
43]. Another factor that may affect habitat choice [
44] is the increasing temperature due to urbanization [
45,
46]. As urbanization progresses, the number of species-rich beetle habitats changes significantly, with rural habitats having a higher species richness than suburban and urban habitats. As surprising as it might seem, species abundance, evenness, and diversity were invariant along urbanization gradients despite the change in species richness. A possible explanation for this contradiction is the diverse reactions of beetle species to urbanization and their sensitivity to environmental changes. Some evidence suggests that poor dispersal species may have limited environmental tolerances and may be particularly sensitive to urbanization (e.g.,
Adoretus granulifrons,
Micipsa arabica,
Mycetocharina vanharteni,
Schizonycha sp., and
Sepidium tricuspidatum). Urban habitats provide a lower availability of resources (dung) than rural habitats, which limits the diversity of coprophilous species (species (e.g., some members of Glaresidae, Histeridae, and Scarabaeidae) [
47]. The urbanization-induced conditions may also benefit generalists and widespread species (e.g.,
G. rusticum and
T. philistina) and also generalist species (e.g.,
M. puncticollis and
Thriptera kraatzi) [
2,
48].
4.2. Species composition
Overall diversity along the urbanization gradient generally displayed heterogeneous patterns [
49]. Species, abundance, richness, and diversity of beetles showed one of three patterns. The first are those decrease along the rural-urban gradient [
22,
50,
51,
52,
53,
54]. Second, some species exhibit higher species richness and diversity in urban habitats than in rural areas [
55,
56,
57,
58,
59]. Finally, there are those species that show no significant differences between urban and rural habitats [
7,
42,
60,
61,
62,
63,
64]. Based on the results of all these studies, it seems that species richness, abundance, or diversity are not entirely appropriate parameters for assessing the effects of urbanization on soil and ground-dwelling beetles [
2]. Species identity and associated natural history offer greater insight into a beetle composition in these habitats than species richness or diversity alone [
41,
65,
66].
A range of factors, such as local urbanization intensity, edaphic factors [
67,
68,
69], vegetation cover, and flora [
42,
70,
71,
72,
73,
74], contribute to variations in the distribution and composition of beetle species associations along Wadi Hanifa. As revealed by CCA, the most significant factors determining the distribution of beetles are urbanization intensities, elevation, soil organic contents, land cover, and flora. DCA has determined that the beetle list falls into three distinct clusters: urban, suburban, and rural. Each cluster contains a different assemblage of beetles (<9% of species shared). ANOSIM analysis confirmed this grouping (R = 0.97, P = 0.001), which aligns with previous reports on ant assemblages in the same area [
28]. The increasing density of buildings, soil organic carbon, percentage and depth of litter cover, as well as the presence of
H. currasavicum, all of which were strongly correlated with axis 1. There were small-sized (e.g.,
Gonocephalum spp.,
M. infuscatus, and
S. orientalis) and scavenger and opportunistic predator beetle species (e.g.,
A. caeruleipennis,
A. crinitus, and
E. lefebvrei). Unlike axis 1, the second axis was associated with elevation and the predominant flora of
A. graecorum,
L. capitata, and
L. shawii. In rural habitats, sites with a high elevation and dominant flora of
L. capitata and
L. shawii were associated with large, xerophilic species (e.g.,
Anthia duodecimguttata,
A. spinosa, and
B. kollari kollari), predators (e.g.,
E. sulcatus M. quadriguttatus), and detritivores (e.g.,
Scleropatroides sp.). There is a correlation between beetle assemblage structure and rural plants (
L. capitata,
L. shawii, and
M. parviflora), suburban plants (
Casuarina equisetifolia and
A. graecorum), and urban plants (
Panicum coloratum,
Atriplex nummularia, and
H. currasavicum). It appears that soil moisture and nutrients are similar among these groups [
75,
76]. The composition of beetle communities is generally influenced by the tree canopy and dense herb cover, which in turn impacts soil moisture, solar radiation, microclimate conditions, as well as the type of prey available [
42,
77,
78].
Lack of management contributes to an increase in litter and logs [
42]. In unmanaged urban sites within Wadi Hanifa, an increase in litter cover and depth has been observed due to the conversion of native flora to perennial vegetation and irrigation. As a result, a significant influence of leaf litter cover and depth was observed in our study on the composition of beetle communities. Litter layers are argued to sustain a significant portion of beetle diversity by creating favorable microenvironments [
79,
80,
81] for prey [
72] or larger polyphagous and generalist beetle species [
58] and enhancing egg and larval development [
56]. Nevertheless, this study found that species richness decreased in conjunction with litter percentage and depth increases. Guillemain et al. [
82], Molnar et al. [
83], and Fuller et al. [
84] also demonstrated this negative correlation between leaf litter cover and beetle richness.
As a critical factor in soil characteristics, the organic content of soil (SOC, SOM) also plays a significant role [
63,
85,
86]. Consequently, the insects inhabiting the soil significantly influence the number and composition of trapped beetle species [
67,
87,
88,
89]. A CCA analysis indicated that both SOC and SOM were higher at urban sites than at suburban and rural sites. This concurs with Asabere et al. [
15], who found that dumping inorganic and organic materials and decaying plant material resulted in increased SOM and SOC in urban areas. A large number of small-sized beetles (e.g.,
Anthelephila caeruleipennis,
A. crinitus, and
Endomia lefebvrei) is indicative of this. These indicator beetles correlated positively with SCO and SOM in urban habitats, whereas SCO and SOM were negatively correlated with suburban and rural indicator beetles.
The construction of houses in urbanized communities leads to homogenized landscapes and uniform disturbance on all sites where topsoil is removed and replaced with pavement. The rigid surfaces (such as buildings, roads, and paving) not only seal off large soil areas but also enhance the proliferation of ruderal plant species. As a result, many soils and ground-dwelling animals' habitats are altered [
21,
42,
43,
90,
91]. As one moves from the heart of Riyadh City to the south, the buildings, pavements, roads, and asphalt represent a gradient of urbanization intensity along Wadi Hanifa. Our urban study sites gradually became overrun with exotic plants such as
A. nummularia,
Pennisetum setaceum, and
Phragmites australis as native vegetation was gradually replaced. As a result of human modification of habitats, certain types of beetles are more likely to survive, such as opportunistic predators (e.g., members of the family Anthicidae).
4.3. Beetle indicator species
According to New [
24], the variation within each habitat can be explained by shifts in highly abundant species. Across the rural-urban gradient, beetle indicators differed in terms of their ecological factors. According to the present findings, urban sites that experienced the most disturbance differed from rural and suburban sites in composition. A total of 23 characteristic beetles have been identified, which have an essential role in determining the structure of the beetle assemblage, as shown by the ordination results. Urban habitats have a high content of indicator species (10 species), perhaps due to the high number of plants and trees [
73,
74]. The perennial vegetation and the irrigation in unmanaged urban areas may act as source habitat for herbivores (e.g.,
M. insanabilis,
P. algerinus, and
Gonocephalum spp.) and opportunistic predators (e.g., members of Anthicidae) [
58]. With increasing levels of anthropogenic disturbance, urban habitats can retain some species from the natural habitats (e.g.,
M. puncticollis,
T. kraatzi, and
T. philistina). However, their richness and abundance will also decrease [
62]. The occurrence of native, habitat-specific beetles (e.g.,
B. wittmeri and members of family Elateridae) in rural areas tend to be higher than in urban areas [
42,
92,
93].