A Buddhist temple in Kyoto has paid two monks a combined ¥6.6 million ($59,000) for years of unpaid overtime after they demanded compensation through a labor union, people involved in the case said Wednesday.

The monks previously worked at a training facility within Higashi Honganji, a major temple in Kyoto city, as nonregular employees starting in November 2013, occasionally logging up to 130 hours in overtime per month until their employment was terminated last month.

The monks pursued their claim with the help of the Kyoto Union, and in the course of the investigation it came to light that the temple had failed to keep track of the number of hours worked.

They also learned that the temple had made an agreement with a union representing temple staff back in 1973 that stipulated the temple would not pay the employees overtime, case sources said. Such an agreement is illegal and the temple is suspected of withholding overtime pay owed to monks for over 40 years.

"Our biggest problem was that we had not kept tabs on how our employees were actually working," the temple said in a statement.