WASHINGTON – Companies are spending again, and that could mean better economic times ahead.

Businesses have invested more money in machinery, computers, steel and other metals in three of the past four months. The uptick is fueling economic growth in the second quarter and may lead to more jobs later this year.

The rise in corporate spending comes at a critical time for the recovery. The unemployment rate has been stuck near double digits all year. And while the pace of layoffs slowed last week, the number of people seeking first-time jobless benefits remains about the same as in January.

Corporate investment “is not only growing but accelerating, which is an encouraging sign that business remains in an expansive mindset,” Michael Feroli, an economist at JPMorgan Chase, wrote in a note to clients.

Overall, orders for durable goods — those expected to last three or more years — fell 1.1 percent last month, the Commerce Department said Thursday. But that was largely the result of a drop in demand for commercial aircraft. Excluding the volatile transportation sector, orders rose 0.9 percent after falling in April.

Contributing to the strength was a 2.1 percent increase in business spending. In the first five months of the year, business orders for equipment and other capital goods are up 15.5 percent.

Companies are parting with more cash to replace outdated equipment, computers and software and to make their workers more productive, said Brian Bethune of IHS Global Insight.

They are exporting heavily to developing economies in China, Brazil and India, Bethune said. In particular, they are shipping construction and mining machines and oil and gas equipment.