Shares of Irvine-based Resources Connection Inc. were up in afterhours trading after the professional services firm beat analysts’ expectations on profit for the recently ended quarter.

Shares of resources Connection, which operates as Resources Global Professionals, were up as much as 7% in after-hours trading Thursday on a recent market value of $565 million.

Resources Connection provides companies with lawyers, accountants and other professionals on a project basis.

The company reported a profit for the three months through May 28 of $5.4 million, up more than 100% from a year earlier.

Analysts on average expected a profit of $4.5 million.

Resources Connection said adjusted earnings came to 9 cents per share.

Revenue rose 9 percent to $145.7 million, from $133.9 million last year.

Analysts, on average, were expecting an adjusted earnings of 10 cents per share on revenue of 146.7 million, according to data provided by FactSet.

The results of staffing agencies such as Resources Connection offer a gauge on the health of large companies that often turn to temporary workers first before bringing on permanent employees.

Resources Connection didn’t provide an outlook for the three months through August.

Analysts on average expect a profit of $4.5 million for the current quarter and revenue of $139.9 million.