This paper evaluates an affirmative action (AA) policy that granted 0.25 out of 10 evaluation points to research groups in Catalonia (Spain) led by a female principal investigator (PI). We use rich administrative data on the universe of applications in three consecutive funding calls for research groups (2014, 2017 and 2021) to show that, after the implementation of the policy (in 2021), the share of groups led by women increased by 8 percentage points. The increase was largely driven by high- quality groups that substituted a male by a female PI. We also show that the policy eliminates the unexplained prereform penalties in the evaluation process against groups led by females, increasing their chances of getting funded. Finally, we show that AA is more effective (and less costly) in promoting female talent than other more conventional policies, such as imposing a minimum share of females in the review board.