ALBANY — They got their men, but it was not cheap.

Overtime payouts for two agencies involved in the hunt for a pair of escaped fugitives in June have recently shown a sharp spike — $22.9 million more from a similar period a year ago — according to records the New York State comptroller’s office released on Friday.

Employees at the Corrections and Community Supervision Department were paid an additional $12.3 million in overtime compared with 2014, from late May through July as claims rolled in. The State Police, meanwhile, received an additional $10.6 million during that time, according to the comptroller’s calculations.

The two fugitives — Richard W. Matt and David Sweat, both convicted killers — escaped from the Clinton Correctional Facility, a maximum-security prison in Dannemora, N.Y., in the northeast corner of the state, late on June 5 or early on June 6. But the men’s plans met inglorious ends: Mr. Matt was shot and killed by a federal agent on June 26, and Mr. Sweat was shot and captured near the Canadian border on June 28.

While all of the overtime may not be attributable to the escape, William Duffy, a spokesman for the State Police, said the primary reason for the increase in June and July was the personnel needed during the manhunt.