If by any agreement with the federal government or any agency thereof or with the state or any agency thereof, a county has agreed to maintain certain county roads or any portion thereof and the maintenance is not being performed to the satisfaction of the federal government or the department, reasonably consistent with original construction, notice thereof may be given by the department to the legislative authority of the county, and if the county legislative authority does not within ten days provide for the maintenance, the department may perform the maintenance, and the state treasurer shall pay the cost thereof on vouchers submitted by the department and deduct the cost thereof from any sums in the motor vehicle fund credited or to be credited to the county in which the county road is located.