If there was a defining economic problem for America as it recovered from the financial crisis, it was stagnant wages.

In the five years following the end of the recession in June 2009, wages and salaries rose by only 8.7 percent, while prices increased by 9.5 percent. In 2014, the median worker's inflation-adjusted earnings, by one measure, were no higher than they were in 2000.

It is commonly said that wage stagnation contributed to an economic anxiety in middle America that carried Donald Trump into the White House.

Yet Trump's rise seems to have coincided with a turnaround in fortunes for the middle class. In 2015, median household income, adjusted for inflation, rose by 5.2 percent; in 2016 it was up by another 3.2 percent. During those two years, poorer households gained more, on average, than richer ones.

The latest development — one that will be of particular interest to President Trump — is that blue-collar wages have begun to rocket. In the year to the third quarter, wage and salary growth for the likes of factory workers, builders and drivers easily outstripped that for professionals and managers. In some cases, blue-collar pay growth now exceeds 4 percent.

Has Trump kept his promise to revive American manufacturing, mining and the like? A more probable explanation is that he came to office just as America began to run out of willing workers to fill all of its job vacancies. As unemployment has fallen, from over 6 percent in mid-2014 to 4.1 percent today, wage growth has gradually picked up.

At first it seemed as if the biggest beneficiaries of a tight labor market would be those in service occupations, such as waiting and cleaning. A year ago service workers were enjoying the biggest pay rises in the economy — 3.4 percent, on average. (Higher minimum wages also helped; 25 states and localities raised minimum pay in 2016.) Over the past year, however, growth in service wages has decelerated slightly. Blue-collar wage growth has surged ahead.

In some industries the labor shortage seems acute. Now is not a good time for Americans to remodel their bathrooms: tile and terrazzo contractors earn 11 percent more per hour than a year ago (and fully one-third more than in 2014). Having a bath may get pricier, too: Workers who make soap have also enjoyed 11 percent wage gains over the past year.

Strong demand, rather than a productivity boom, is driving the scramble for workers. In the manufacturing sector, for example, output per hour worked is just 0.1 percent higher than a year ago, and has not grown at all in the past five years. Production and wages have picked up anyway.

One reason is a cheapening dollar. On a trade-weighted basis, the greenback fell by almost 9 percent between the start of the year and mid-September (it has since recovered a little). A weaker dollar and a strengthening world economy have spurred demand for American goods. In the first three quarters of the year, goods exports were up by nearly 4 percent on 2016.

At the same time, a rebound in oil prices from their trough in early 2016 has set off another cycle of investment in the shale industry. America currently has 907 active oil rigs, up from 568 a year ago, according to Baker Hughes, an oil-services firm. Economists at UBS, a bank, estimate that energy investment has caused nearly three-fifths of all economic growth in 2017, once the effect of fluctuating inventories has been stripped out of the figures.

If these trends continue, higher wages may begin to tempt more men, who dominate blue-collar occupations, to look for jobs (those who do not seek work do not count as unemployed). For the past two years, the strengthening labor market has encouraged more jobseeking by so-called prime-aged workers, those aged between 25 and 54. But the increase in workforce participation has been almost entirely concentrated among women. At 89 percent, male prime-age participation remains close to a record low.

Whether male participation improves may depend on whether men are prepared to up sticks and move to where the labor market is booming. UBS's economists note that Texas and neighboring oil states such as Oklahoma account for almost all of the acceleration in manufacturing employment this year. Industries and places where blue-collar employment has been in a decades-long decline are unlikely to stage a recovery.

Jed Kolko, chief economist for Indeed, a jobs website, says that even some of the recent wage gains are misleading, because they have occurred in industries, such as textile manufacturing, in which employment continues to fall.

Rising incomes for lower- and middle-earners may help reduce inequality, especially if wage growth for higher-earners remains subdued. A recent analysis by the Economic Policy Institute, a left-leaning think tank, found that real wages for the top 1 percent of earners fell by 3.1 percent in 2016, and were lower that year than they were in 2007.

As workers' wages grow, companies' profit margins may also come under pressure, reducing, somewhat, the capital income of the rich. Texas Roadhouse, a chain of steak restaurants, recently warned investors that it expects its wage bill to grow by 7 percent to 8 percent in 2017.

After years of imbalance, a shift in economic power toward workers is to be welcomed, so long as inflation remains low. Yet wage growth also helps determine the fate of politicians, whether or not they deserve it.

Trump's election led to soaring small-business confidence, which is yet to abate. His promise to deregulate the energy sector may have spurred some investment. Yet his apparent economic success to date mostly reflects fortunate timing.

That will not stop him from taking the credit should a tight labor market lift America's spirits as the 2020 presidential election approaches.

Rightly or wrongly, the biggest beneficiary of a sustained wage boom for workers may be a suited man sitting in the Oval Office.

Copyright 2013 The Economist Newspaper Limited, London. All Rights Reserved. Reprinted with permission.