Section 13. If the superintendent of any facility determines that failure to retain a male resident therein in strict security would create a likelihood of serious harm by reason of mental illness and that the person’s violent behavior constitutes an emergency, he may, with the consent of the commissioner, transfer the person to the Bridgewater state hospital for a period not to exceed five days. At the end of the five days the person shall be returned to the facility unless before the end of the five day period, the superintendent of the facility or medical director of the Bridgewater state hospital has filed a petition for his commitment to the Bridgewater state hospital under sections seven and eight. Such commitment shall not be ordered without a hearing. Such petition shall be brought in the district court of Brockton unless already filed in some other court before the emergency transfer.