Introduction
Equal treatment under the law is a core tenet of liberal democracies. However, a large and growing body of research demonstrates that biases against minorities pervade judicial decision making across various stages of the legal process. In the United States, biases against racial minorities have been documented in various domains, including pre-trial detentions (Domínguez et al Reference Domínguez, Grau and Vergara2022), bail setting (Arnold et al Reference Arnold, Dobbie and Yang2018), sentencing (Bushway and Piehl Reference Bushway and Piehl2001; Rehavi and Starr Reference Rehavi and Starr2014), and imprisonment (Harris Reference Harris2024). Such inequities are not unique to the United States; similar biases have been identified against immigrant defendants in Germany (Light Reference Light2016), the Netherlands (Light and Wermink Reference Light and Wermink2020), and Chile (Domínguez et al Reference Domínguez, Grau and Vergara2022). In a landmark study on in-group bias in judicial decision making, Shayo and Zussman (Reference Shayo and Zussman2011) demonstrate that both Arab and Jewish judges in Israel are more likely to rule in favor of co-ethnic plaintiffs. When minority groups are underrepresented among judges and other decision makers in the criminal justice system, such in-group biases can translate into preferential treatment for majority over minority defendants at the aggregate level. Taken together, prior research has found identity-based biases in judicial decision making, resulting in significant inequalities in legal treatment: all else being equal, minority offenders tend to receive significantly harsher legal treatment across a variety of contexts.
Building on this body of research, this study shifts focus to a new, previously understudied dimension of bias in the criminal justice system: efforts to rehabilitate and reintegrate offenders from marginalized communities into society. Specifically, we examine anti-immigrant bias in the application of rehabilitative v. punitive justice – two opposing paradigms in criminal justice (Benson Reference Benson2003). Punitive justice is founded on the notion that punishment is a deserved consequence of crime and that imposing penalties, such as imprisonment or fines, deters future criminal behavior. Rehabilitative justice, on the other hand, focuses on reform and reintegration. Following this view, criminal behavior is, at least in part, a result of societal, psychological, or environmental factors. Rehabilitative justice seeks to address these underlying causes and reduce the likelihood of recidivism through a wide range of methods, including therapy, education, and skill-building programs. These opposing paradigms in criminal justice are reflected in the legal systems of different countries, with some countries (for example the United States) emphasizing punishment over rehabilitation and other countries (for example Norway) focusing on the social reintegration of offenders. In sum, while punitive justice emphasizes societal retribution and the reinforcement of legal norms, rehabilitative justice focuses on the individual offender’s potential for personal transformation and reintegration, reflecting a more optimistic view of human nature and the capacity for change.
To examine anti-immigrant bias in the choice between punishment and rehabilitation, we study the case of Germany, where juvenile criminal law (JCL, Jugendstrafrecht) and general criminal law (Allgemeines Strafrecht) mirror punitive and rehabilitative justice as opposing paradigms in criminal justice. General criminal law primarily focuses on punishment and deterrence through fines and prison sentences. In contrast, the German legal code explicitly states that the primary objective in juvenile criminal law is not punishment or retribution, but rather the prevention of recidivism among the affected youths.Footnote 1 Given the objective of social reintegration rather than deterrence, JCL sentences are typically not punitive; they prioritize educational programs, psychological counseling, and other supportive measures designed to tackle the root causes of criminal behavior (Dünkel Reference Dünkel, Maguire, Morgan and Reiner2016; Ostendorf and Drenkhahn Reference Ostendorf and Drenkhahn2022).
Crucially, judges have discretion over the application of JCL or general criminal law for eighteen- to twenty-year-old offenders. This binary decision is based on judges’ subjective assessment of the offenders’ psychological ‘maturity’. Following the German legal code, JCL ought to be applied if the offender was either (1) similar to a juvenile in terms of moral and intellectual development at the time of the offense or (2) if the offense signals youthful delinquency (for example graffiti vandalism; Ostendorf and Drenkhahn Reference Ostendorf and Drenkhahn2022). Judges enjoy a large degree of discretion in determining whether either condition for the application of juvenile criminal law is fulfilled. While guidelines exist for the criteria that can be taken into consideration for the assessment of offenders’ psychological maturity, they are vague and not legally binding.Footnote 2 We leverage this feature of the German criminal code to study anti-immigrant bias in the application of punitive v. rehabilitative justice.
Our empirical analysis focuses on immigrant–native disparities in the application of juvenile criminal law to test for anti-immigrant bias in judicial authorities’ commitment to reintegrating different groups of offenders into society. We draw on case-level registry data covering all court proceedings in Germany between 2009 and 2018. Using these data, we estimate the probability of being sentenced under juvenile criminal law for eighteen- to twenty-year-old foreign defendants compared to otherwise similar German citizens who were charged with the exact same crime in the same judicial district in the same year. Across a series of specifications, we find that foreign citizens are about 10 percentage points less likely to be sentenced under juvenile criminal law. This bias is most pronounced for relatively minor offenses and among first-time offenders with no prior criminal record.
In the second step of our empirical analysis, we explore the drivers of anti-immigrant bias in the application of rehabilitative justice through the lens of social identity theory. This theory posits that individuals derive value and a sense of identity from their membership in social groups – such as national or ethnic groups – and that this group identification, in turn, influences attitudes and behavior across a variety of domains. Specifically, we follow the perspective put forward by Shayo and Zussman (Reference Shayo and Zussman2011), who argue that in-group favoritism in judicial decisions is most likely in social environments where group-based identities are strong and salient. We examine this argument empirically in our setting: first, we use geographic variation in regional support for the far-right party Alternative für Deutschland (AfD) – an indicator of nationalist sentiment and heightened German in-group identification among the local population. Second, we leverage temporal variation following the large-scale influx of refugees into Germany after 2014, an event that significantly increased the salience of the native–foreign societal cleavage in the context we study. We find that judicial bias is (1) positively correlated with support for the far right across regions and (2) has significantly increased since 2015. These findings align with the notion that endogenous social identification processes drive biases against minorities. In addition, we find evidence that differential legal treatment on the basis of residency status contributes to the immigrant–native gap in the application of juvenile criminal law.
The differential application of rehabilitative justice is consequential for at least three reasons. First, in line with its rehabilitative focus, sentences under JCL are generally more lenient than those under general criminal law. The maximum penalty under JCL is ten years of youth imprisonment, even for severe offenses that under general criminal law could carry sentences well over a decade (for example murder, or severe cases of robbery, arson, rape, and sexual assault).Footnote 3 In addition – and in contrast to general criminal law – JCL mandates no minimum sentences for any offense. This allows courts to tailor sanctions specifically to each individual case and offender. Consequently, the majority of cases under JCL do not result in fines or prison sentences; instead, they primarily involve educational or disciplinary measures such as anti-violence training, community service, counseling, warnings, or restitution orders (Dünkel Reference Dünkel, Maguire, Morgan and Reiner2016). Second, most convictions under juvenile criminal law do not appear on the criminal record (see SI section A.1.3 for details). As a result, sentences under JCL allow offenders to retain all future employment opportunities, in particular for jobs that require a clean criminal record, such as many civil-service positions. Finally, recent research suggests that the rehabilitative opportunities that form an integral part of JCL sentencing can have a positive effect on offenders’ post-conviction trajectory, in particular with respect to recidivism (see, for example, recent quasi-experimental work by Lotti [Reference Lotti2022] and Alsan et al [Reference Alsan, Barnett, Hull and Yang2024]). By prioritizing rehabilitation over punishment, the application of JCL signals a commitment by the judicial system to invest in the long-term future of the offender since positive long-term change is the explicit goal of JCL. Denying immigrant offenders access to these rehabilitative opportunities can have detrimental second-order effects on a great variety of outcomes, including lifetime employment opportunities and earnings. Bias in the application of rehabilitative justice can thus exacerbate pre-existing inequities between groups.
Our study advances the literature on judicial biases and discrimination in several ways. First, we shift focus to a previously unexplored dimension of bias within the criminal justice system: inequalities in the application of rehabilitative justice. While most existing studies focus on punitive disparities – such as differences in sentencing lengths or severity – we highlight how biases likewise manifest in the reduced allocation of rehabilitative opportunities to offenders from minority groups. By demonstrating the biased application of juvenile criminal law, we show that minority offenders are systematically disadvantaged in access to programs crucial for their long-term prospects. We thus highlight an additional pathway through which judicial bias can exacerbate social inequities. Second, we present new evidence on the interplay between judicial discretion and discrimination against minorities. Our findings build on Yang (Reference Yang2015), who presents evidence that judicial biases most easily materialize in legal settings where judges have considerable individual discretion and leeway – as is the case in the application of German juvenile criminal law. Third, we provide new evidence on the role of social identities in judicial decision-making. Consistent with prior work, we find evidence for in-group favoritism in judicial decisions and observe that this bias intensifies in social contexts and periods where group-based identities are most salient (Shayo and Zussman Reference Shayo and Zussman2011; Emeriau Reference Emeriau2024; Spirig Reference Spirig2023). Taken together, our results suggest that the rise in anti-immigrant sentiment and increased support for far-right politics in advanced democracies may have profound implications for immigrants navigating the criminal justice system.
Data and Empirical Strategy
Our empirical analysis draws on case-level registry data covering all court proceedings under German criminal law between 2009 and 2018 (Strafverfolgungsstatistik). In addition to detailed information on the crime and sentence for all cases, we also observe the offender’s nationality, age, gender, and prior criminal record. Because we are interested in anti-immigrant bias in the optional application of juvenile criminal law, we limit the sample to defendants who were eighteen to twenty years old at the time of the respective crime. In total, we observe about 792,000 court cases for eighteen- to twenty-year-old offenders during our study period (see section A.3.1 in the SI for more details).
Using these data, we estimate the likelihood of being sentenced under juvenile criminal law for foreign offenders compared to otherwise similar German citizens who were charged with the exact same crime in the same judicial district in the same year. We also ensure that we compare foreign and native offenders of the same age and gender, and with similar criminal records. To do this, we estimate a series of OLS linear probability models of the following form:
where Y i is a binary indicator that equals one if juvenile criminal law was applied in case i and zero otherwise, if general (adult) criminal law was applied. Our main coefficient of interest is β 1, which identifies the average difference in the probability of juvenile criminal law for foreign offenders compared to German citizens. For our main results, we adjust for covariates using fully interacted fixed effects. This allows us to flexibly adjust for all possible interactions between covariates (for example the effect of gender might vary across different crimes or localities). α 1 + α 2 + … + α k hence denote a series of fixed effects for all possible combinations of (1) gender, (2) birth year, (3) number of previous convictions, (4) year of crime, (5) judicial district, and (6) crime. We note that we use highly granular information on the type and severity of the crime: we control for the specific paragraph, section (Absatz), number, and letter of the penal code invoked for the most severe crime in each case. For our most demanding specification, we include a total of K = 393, 541 fixed effects. We also estimate a model using exact matching on all covariates as an additional robustness check. We conduct heterogeneity analyses by repeating our main analysis in different subsets of the data. For example, to obtain regional estimates of anti-immigrant bias in different judicial districts, we re-estimate our main specification, including all fixed effects, in separate subsets of the data for each judicial district.
We present descriptive statistics of our data in Table A.4 (full sample) and Table A.5 (foreign v. native defendants). Foreign offenders account for about twenty-two per cent of all cases in our data. Not adjusting for any covariates, they are 8.5 p.p. less likely than natives to be sentenced under juvenile criminal law (69.8 per cent v. 61.3 per cent). Overall, the share of cases adjudicated under JCL has decreased during the time period we study, from about 70 per cent in 2009 to 65.5 per cent in 2018 (see Figure A.3).
In Table A.4, we also characterize the effective sample (Aronow and Samii Reference Aronow and Samii2016), that is, we characterize the sample composition conditional on the regression weights of our most demanding specification, including all interacted fixed effects. We find that the effective sample for our main OLS effect estimate is largely similar to the population distribution in terms of offender characteristics (age, gender, previous convictions).Footnote 4 Severe offenses that rarely occur, such as murder and robbery, are slightly underrepresented in our effective sample due to limited overlap. However, given the low incidence of such crimes, this has a negligible impact on the generalizability of our results. Overall, our effective sample largely reflects the distribution of criminal cases in Germany.
Results
We present our main results in Table 1. We find a statistically significant immigrant–native gap in the application of rehabilitative justice. Based on our preferred specification (column 3), foreign citizens are about ten percentage points less likely to be convicted under juvenile criminal law. This constitutes a sizable effect magnitude relative to the probability of 69.8 per cent for the application of juvenile criminal law for eighteen- to twenty-year-old German offenders (Table A.5). This bias in the application of rehabilitative justice not only implies that immigrant offenders receive substantially harsher sentences for the same crime, but also highlights significant anti-immigrant bias by judicial authorities in their efforts to reintegrate offenders from immigrant communities into society.
Table 1. OLS estimates of anti-immigrant bias in the application of juvenile criminal law

Note: Robust standard errors in parentheses, levels of significance: *p < 0.05, **p < 0.01. We note that we use highly granular information on the type of crime: we control for the specific paragraph, section (Absatz), number, and letter of the penal code invoked for the most severe crime in each case. The number of observations (N) in Model (4) refers to the number of matched observations.
Regarding heterogeneity by offenders’ characteristics, we find similar anti-immigrant bias across offenders’ age and gender (Table A.6). Examining offenders with varying criminal records yields the strongest immigrant penalty for first-time offenders with no prior criminal record (Figure A.5, right panel). However, even for repeat offenders with three or more previous convictions, we still observe a sizable, statistically significant immigrant penalty.
When we examine heterogeneity across different types of crimes, we observe the largest immigrant penalty for relatively minor offenses such as theft or insults (Figure A.5, left panel). In contrast, for the most severe crimes – particularly murder and sexual assault – we find smaller, statistically insignificant effect estimates. While most offenses committed by eighteen- to twenty-year-olds are adjudicated by an individual judge, severe offenses that could result in a youth prison sentence of one year or longer are tried by a jury. This likely limits the extent to which biases of individual judges can directly influence judicial decisions.Footnote 5 The heterogeneity we observe across different types of crimes thus aligns with previous work showing that judicial biases are most likely to manifest in settings where courts have substantial discretion (Yang Reference Yang2015).
Judicial Bias and Social Identity
Next, we explore the drivers of judicial bias in the application of rehabilitative justice through the lens of social identity theory, following the theoretical framework of Shayo and Zussman (Reference Shayo and Zussman2011). This model posits that individuals’ identification with specific social groups – such as ethnic, national, or class identities – underlies in-group favoritism that manifests in a variety of domains, including judicial decision-making. Simultaneously, these social identities are influenced by the salience of group-specific attributes, which in turn is shaped by the social environment in which individuals are embedded. Accordingly, in-group favoritism is expected to be more pronounced in contexts where social identities are stronger and more salient.Footnote 6
We apply this framework and examine the link between judicial bias and the strength and salience of German in-group identity across two sources of variation. First, we proxy the strength of German in-group identification via regional variation in support for the radical-right party Alternative für Deutschland. As shown in Figure 1, we find that judicial bias is spatially correlated with electoral support for the far right. However, even in districts with low far-right support, we observe a substantial anti-immigrant bias in judicial decisions.

Figure 1. Judicial bias and anti-immigrant voting across judicial districts.
Note: Regional estimates of anti-immigrant bias in the application of juvenile criminal law (y-axis) correlated with anti-immigrant sentiment in the general population, proxied through AfD voting in the 2017 federal election (x-axis). Each observation corresponds to one of 115 judicial districts (two districts are omitted due to data privacy restrictions). The bivariate correlation is displayed on the top right. The black line shows a LOESS smoothed fit. The outlier district (AfD vote share 32.6 per cent) is the ‘Landgericht Görlitz/Bautzen’. See SI section A.3.2 for more details on the processing of the electoral data.
Second, we analyze nationwide temporal trends related to the increasing salience of the native–foreign divide in Germany. Specifically, we explore how judicial bias changed after 2014, that is, during the time period when the foreign–native divide became more salient in German society following the arrival of more than one million refugees (see Figure A.4a). While we find a strong, statistically significant general decrease in the application of juvenile criminal law after 2014, this decrease was substantially stronger for foreign offenders (column 1, Table 2). In other words, we find an increase in in-group favoritism in judicial decision-making after 2015.Footnote 7 This increase in judicial bias was strongest (especially in relative terms) for offenders from the Middle East and Africa, who were most closely associated with the refugee influx (Table 2, column 2; see also Figure A.4b). For this group, judicial bias more than doubles after 2014. We find a smaller increase in judicial bias against Eastern European offenders (column 3) and no increase against offenders from Western countries (column 4, for example Norway, Austria, Spain, etc.), who are perceived as least socially distant from the German in-group. It is important to note that these comparisons of effect magnitude across subsets should be viewed as suggestive, not definitive evidence, as the underlying covariate distribution changes both across subsets and over time (see SI section A.6.5 for details). Nevertheless, our findings are consistent with the social identity framework (Shayo and Zussman Reference Shayo and Zussman2011): stronger, more salient German in-group identification after 2015 and in localities with high far-right support correlates with higher levels of in-group favoritism among judges.Footnote 8
Table 2. OLS estimates of anti-immigrant bias in the application of juvenile criminal law before and after 2014, by citizenship-region

Note: Robust standard errors in parentheses, levels of significance: *p < 0.05, **p < 0.01. We detail how we aggregated nationalities into regional categories in SI section A.3.4. MENA: Middle East and North Africa.
Robustness and Additional Tests
Below, we present the results from a series of additional tests and supplementary analyses we conducted to examine alternative explanations and ensure the robustness of our results.Footnote 9
Sample selection
A potential concern regarding our empirical strategy is sample selection, as we do not observe criminal cases that are dismissed prior to the involvement of any court. We address potential selection effects in three ways. First, we note that any bias from police or prosecutors influencing the likelihood of prosecution and shaping selection into court would have to disproportionately increase the frequency of court cases for ‘less mature’ natives committing the same crimes in order to account for our findings. However, prior research suggests the opposite: minorities face a lower threshold for investigation or arrest (Knox et al Reference Knox, Lowe and Mummolo2020), while charges against native offenders are more likely to be dropped (Light et al Reference Light, Robey and Kim2023). Thus, sample selection would likely lead us to underestimate, rather than overestimate, judicial bias in the application of rehabilitative justice. Second, and in line with this theoretical expectation, we provide empirical evidence that sample selection, if anything, leads us to underestimate the true degree of judicial bias in section A.4 in the SI. While our main analysis includes cases dismissed by courts, we find even stronger estimates of anti-immigrant bias when focusing solely on the sentencing stage of the criminal process, that is, excluding cases dismissed by courts (column 1, Table A.3). Third, we bound the degree of potential selection bias that could arise due to differential dismissals prior to court involvement (for example, victims may be less likely to press charges against native offenders) following Smith and VanderWeele (Reference Smith and VanderWeele2019). We estimate that any unobserved factor U would need to decrease the likelihood of sample selection for natives by a factor of 1.57 and simultaneously increase their odds of being sentenced under juvenile law by the same factor to account for our results (see SI section A.4.4 for details).
Allocation across courts
While the assignment of cases within courts follows nationality-neutral bureaucratic criteria,Footnote 10 courts located in areas with higher proportions of foreign residents could, in principle, systematically differ in their propensity to apply JCL. This could bias our estimates if, for example, courts serving more diverse neighborhoods are generally less lenient. While we cannot test this directly at the court level due to data limitations, we examine the relationship at the judicial-district level and find no evidence that districts with a higher share of foreign defendants are less likely to apply JCL. We also note that the post-2014 increase of the immigrant–native JCL gap (see Table 2) is unlikely to be driven by static selection into harsher courts. We discuss this point in more detail in SI section A.2.
Unobserved maturity differences
A second potential concern is that unobserved differences in ‘true’ maturity between immigrant and native defendants, rather than bias, could explain our findings. We address this in five ways (see SI section A.6.3 for details). First, excluding nationalities that account for the vast majority of unaccompanied minors, who might be particularly mature for their age, does not affect our estimates. Second, our results are robust to dropping offenses typically associated with youthful immaturity (for example graffiti vandalism). Third, age misreporting is unlikely to drive our findings. Our estimates are unchanged when we exclude defendants from the main refugee-sending countries, those without passports, or those with a recorded birthdate of 1st January. Fourth, we show that controlling for case processing duration leaves our results unchanged. Finally, to address any remaining concerns about unobserved confounding, we ran a sensitivity analysis following Cinelli and Hazlett (Reference Cinelli and Hazlett2019). We find that any unobserved confounder would need to be more than three times as predictive of foreign citizenship and JCL as either (i) previous convictions or (ii) the type of committed crime to nullify our results (Figure A.7). Taken together, these additional tests increase our confidence that the patterns we observe are, at least in part, driven by anti-immigrant bias: the less frequent application of JCL to immigrant offenders is not reducible to objective maturity differences.
Residency status
A potential mechanism driving our findings is that some immigrants, due to their residency status, are not expected to stay in the country long-term (Light and Wermink Reference Light and Wermink2020). This may reduce the state’s incentive to invest in the long-term future of the offender. We cannot directly test this mechanism due to data limitations, as we do not observe defendants’ residency status. We address this limitation in several ways (see SI section A.6.4 for details). Specifically, we show that our results are robust to (i) omitting border districts, (ii) controlling for outmigration and tourism rates, and (iii) restricting the analysis to nationalities with low rates of unlimited residency. While we find evidence that immigrants’ expected length of stay in the country plays a role, statistically significant gaps persist across all specifications, suggesting that legal residency alone does not account for our results. However, differential legal treatment on the basis of residency status likely represents an additional mechanism – beyond social identity (see section Judicial Bias and Social Identity) – that contributes to the immigrant–native gap in the application of juvenile criminal law.
Discussion
We present robust evidence that judges disproportionately opt for punitive over rehabilitative justice for immigrant offenders. In line with prior work, our findings imply substantially more severe crime sentences for immigrant offenders, which may compound disadvantages faced by immigrant communities in other societal domains. Harsher sentences may, for example, lead to disruptions and potential cessations of educational trajectories (Kirk and Sampson Reference Kirk and Sampson2013), which can further compound educational disadvantages faced by immigrants. Beyond raising concerns about equal treatment, these findings offer a novel perspective on immigrants’ relative overrepresentation in crime statistics beyond biased policing and economic deprivation. Anti-immigrant bias in the application of rehabilitative justice may translate into higher rates of recidivism among immigrant offenders over the life course (Bergseth and Bouffard Reference Bergseth and Bouffard2013; Alsan et al Reference Alsan, Barnett, Hull and Yang2024). A lack of rehabilitative support for immigrant offenders can perpetuate a cycle of crime by failing to equip offenders with the necessary skills and resources for effective societal reintegration.
Our findings indicate a connection between judicial biases and the social context in which judges are embedded. In an era when xenophobia is on the rise in many advanced democracies, the increasing salience of national and ethnic identities could have far-reaching consequences for minority communities. Beyond the immediate impacts, such as exposure to xenophobic hate crimes and hate speech, our findings suggest that these societal shifts may also influence judicial decisions, resulting in stronger in-group favoritism and more punitive legal treatment for minorities.
Supplementary material
The supplementary material for this article can be found at https://doi.org/10.1017/S0007123425100884.
Data availability statement
Replication data for this paper can be found in Harvard Dataverse at https://doi.org/10.7910/DVN/VNDPGO.
Acknowledgments
We are grateful to Erik Weiss for his invaluable insights and guidance in navigating the intricacies of German juvenile criminal law. We also thank Johannes Giesecke for his support throughout this project, and Florian Köhler (FDZ) for efficiently managing our access to the registry data. We further thank the audiences at the Fall Academy ‘Challenging Inequalities’ at the University of Konstanz for their helpful comments and suggestions.
Financial support
This research received no specific grant from any funding agency, commercial, or not-for-profit sectors.
Competing interests
The authors declare none.

