Teachers recruited during a recession and a tougher jobs market are more likely to get better results for their pupils, says a study.
The researchers say in an economic decline, with pressure on employment, teaching attracts more talented staff.
Academics analysed results in more than 30,000 schools in Florida in the US and found higher scores in classes taught by teachers hired in the recession.
They also say it shows higher pay "would improve teacher quality".
The study from the National Bureau of Economic Research in the US examines how the recession and a tighter jobs market affected the quality of recruits into teaching.
'Window of opportunity'
The analysis, to be presented at the the European Economic Association in Mannheim in Germany, found that teaching attracted more talented graduates at times when other employment opportunities were worsening.
And when looking at exam results, pupils on average did better in classes taught by teachers hired during a recession.
This compared 5,200 teachers in Florida state schools who started during a recession and 27,800 teachers who started in non-recessionary times.
"Teachers who entered the profession during recessions are significantly more effective than teachers who entered the profession during non-recessionary periods," concluded the study.
During a recession, other careers could seem more insecure, offered fewer opportunities or could have reduced pay, which would push a higher number of "able individuals" towards teaching.
This economic analysis argues that this suggests that increasing teachers pay would attract higher-quality recruits, which is linked to higher results.
"Our results provide the strongest evidence to date that making teaching wages more attractive would improve teacher quality," said authors Markus Nagler, Marc Piopiunik and Martin West.
"What's more, while no-one would hope for an economic downturn, recessions do seem to provide a window of opportunity for the government to hire teachers who would otherwise have not chosen this career path."
A separate study for the National Bureau of Economic Research, also being presented at the European Economic Association conference, shows how the level of learning of teachers influences the outcomes for pupils.
Research into the value of "smarter teachers", such as their ability levels in literacy and numeracy, can mean a year's difference in the results of pupils.