WASHINGTON—U.S. workers received their biggest pay increases in nearly a decade over the 12 months through June, a sign the strong labor market is boosting wages as employers compete for scarcer workers.

The Labor Department’s employment-cost index rose 2.8% in the year to June compared, the government said Tuesday. Wages and salaries, which account for about 70% of all employment costs, also rose 2.8% from a year earlier, the strongest gain for both measures since September 2008.

Since the end of the most recent recession, U.S. unemployment has fallen to 4% in June from nearly 10% nine years earlier. Wage growth, stubbornly sluggish for years following the 2007-2009 downturn, has picked up as the labor market has tightened and employers have raised pay to attract and retain workers.

It is now approaching the average pace seen in earlier periods of growth. From 2001 to 2007, wages and salaries as measured by the employment-cost index increased 2.9% a year on average, well above the 1.9% average since the second quarter of 2009 when the current expansion began.

Wage gains are coming with a modest pickup in inflation, which is eating at some of the gains for workers.