If, upon examination, a mine or a portion of it is found to be in an unsafe condition as defined by regulations adopted under this chapter or if proper first aid or mine rescue measures have not been adopted, the department shall at once serve notice in writing upon the owner, lessee, agent, operator, manager, or superintendent of the mine, setting out the nature of the defects that render the mine unsafe or insecure and the place in the mine where the defects exist, and require the repairs necessary to remedy the defects to be made within a specified time. If circumstances require it, the department shall forbid the operation of the mine or portion of it that is declared unsafe or insecure, except for the purpose of making necessary repairs to make the mine safe for employees in it and for the purpose of permitting inspection and investigation of the conditions described in the notice.