While in the performance of their duties in extending such aid, firefighters shall be subject to the control and direction of the chief fire official of the municipality within which the fire or other emergency occurs, and they shall have the same immunities and privileges as if performing the same duties within their respective city, town, village or fire district.