A firefighter who, for the number of years required for retirement, actually has served in a fire department in a municipality, rural fire department, or rural fire protection district in which a firefighters relief association has been organized and who pays into the firefighters relief and pension fund maintained in the municipality, rural fire department, or rural fire protection district assessments equal to the amounts assessed against the members of the association during the time of the firefighter’s service in the department, with interest upon the assessments, must be allowed membership in the association and is entitled to receive, upon retirement, the same pension from the fund as is paid to other firefighters. The bylaws of an association may not contain any provision that discriminates against a firefighter who actually has worked as a firefighter during the number of years required by the bylaws or which prevents the firefighter from, or discriminates against the firefighter in, participating in the association or in the benefits from the fund. The rights provided for in this chapter are acquired by compliance with this section whether compliance was accomplished before or after July 1, 1935, without regard to the time when the required service was performed.