Every court shall have power:

(1) To preserve and enforce order in its immediate presence and as near thereto as is necessary to prevent interruption, disturbance or hindrance to its proceedings;

Terms Used In Alabama Code 12-1-7

(2) To enforce order before a person or body empowered to conduct a judicial investigation under its authority;
(3) To compel obedience to its judgments, orders and process and to orders of a judge out of court, in an action or proceeding therein;
(4) To control, in furtherance of justice, the conduct of its officers and all other persons connected with a judicial proceeding before it in every matter appertaining thereto;
(5) To administer oaths in an action or proceeding pending therein and in all other cases where it may be necessary in the exercise of its powers and duties; and
(6) To amend and control its process and orders so as to make them conformable to law and justice.