A holding device , particularly a holding arm, for medical purposes for holding an attached device, particularly a surgical mechatronic assistance system and/or surgical instrument, having a proximal end for attaching the holding device to a base and a distal end for receiving an attached device ; at least one first and one second arm segment , wherein the first arm segment being connected to a first joint and the second arm segment being connected to a second joint , wherein each joint being releasable and lockable; an operator control device for releasing and/or locking the corresponding joint for placing the holding device in a desired pose; and a control unit comprising a processor and program code means for controlling the holding device ; at least one receiver for electromagnetic radiation connected to the control unit and adapted for transmitting signals to the control unit on the basis of received electromagnetic signals of a surgical navigation system , characterized in that the holding device is adapted to be operated in a navigation mode and an operator mode, wherein the holding device in the operator mode can be operated purely manually by means of an operator control device provided for the holding device , and in the navigation mode is prepared and adapted for receiving commands from the navigation system and being controlled by it, wherein the control unit is set up for determining on the basis of the signals being transmitted from the receiver to the control unit, whether the holding device is present in a navigated surgical environment or is not present in a navigated surgical environment, and wherein the holding device switches automatically into the operator mode, if it is not present in a navigated surgical environment, and switches automatically into the navigation mode, if it is present in a navigated surgical environment. a proximal end for attaching the holding device to a base and a distal end for receiving an attached device ; at least one first and one second arm segment , wherein the first arm segment being connected to a first joint and the second arm segment being connected to a second joint , wherein each joint being releasable and lockable; an operator control device for releasing and/or locking the corresponding joint for placing the holding device in a desired pose; and a control unit comprising a processor and program code means for controlling the holding device ; at least one receiver for electromagnetic radiation connected to the control unit and adapted for transmitting signals to the control unit on the basis of received electromagnetic signals of a surgical navigation system , characterized in that the holding device is adapted to be operated in a navigation mode and an operator mode, wherein the holding device in the operator mode can be operated purely manually by means of an operator control device provided for the holding device , and in the navigation mode is prepared and adapted for receiving commands from the navigation system and being controlled by it, wherein the control unit is set up for determining on the basis of the signals being transmitted from the receiver to the control unit, whether the holding device is present in a navigated surgical environment or is not present in a navigated surgical environment, and wherein the holding device switches automatically into the operator mode, if it is not present in a navigated surgical environment, and switches automatically into the navigation mode, if it is present in a navigated surgical environment. <EOS>