(a)
Whenever a special district or joint powers agency that provides fire protection or a city fire department is dissolved or the area it serves is decreased by reason of a consolidation, merger, incorporation, annexation, or contract, and the district, joint powers agency, or city fire department taking over the duties of the dissolved or decreased district, joint powers agency, or department decides to hire additional firefighters, it shall give first choice for the positions to be filled to firefighters employed by the dissolved or decreased district, joint powers agency, or department. As nearly as possible, the firefighters who are hired shall be given positions with a rank comparable to that which they held in the dissolved or decreased district, joint powers agency, or department. No firefighter shall be hired who is over the mandatory retirement age of the district, joint powers agency, or city fire department which is taking over the duties of the dissolved or decreased district, joint powers agency, or department.
(b)
Notwithstanding any other provision of law, where firefighters are hired as a result of the consolidation, merger, incorporation, annexation, or contract, the seniority or other employment rights of the employees of the district, joint powers agency, or fire department taking over the duties of the dissolved or decreased district, joint powers agency, or department shall not be impaired as a result of the consolidation, merger, incorporation, annexation, or contract, except as otherwise agreed upon in a county, other than a county of the first class, in a memorandum of understanding with each employee organization, which has been recognized pursuant to Chapter 10 (commencing with Section 3500) of Division 4 of Title 1, and which represents employees of the district, joint powers agency, or department taking over the duties of the dissolved or decreased district, joint powers agency, or department who are in classes affected by the consolidation, merger, incorporation, annexation, or contract.