H&E Equipment Services Inc. reported a second-quarter profit of $2.7 million, or 8 cents per share, compared with a loss of $7.1 million, or 20 cents per share, a year ago.

The Baton Rouge company, which sells and leases heavy equipment, reported a 40.7 percent jump in revenue to $184.3 million with growth in all of its operating segments.

New equipment sales doubled, driven by demand for crane and earthmoving machinery.

“With 41 percent revenue growth on a year-over-year basis and 37 percent on a sequential basis, the current trends in our business are particularly encouraging despite a commercial construction environment that remains relatively dormant,” said John Engquist, H&E Equipment Services president and chief executive officer in a news release.

Engquist also cited improvement in the rental business, where sales jumped 33.8 percent to $55.8 million.

H&E’s rental results were helped by higher rental prices and a larger fleet, the company said.