California Code
CHAPTER 4 - Incidental Powers and Duties of Judicial Officers
Section 177.

177. A judicial officer shall have power:

(a) To preserve and enforce order in the officer’s immediate presence, and in proceedings before the officer, when the officer is engaged in the performance of official duty.

(b) To compel obedience to the officer’s lawful orders as provided in this code.

(c) To compel the attendance of persons to testify in a proceeding before the officer, in the cases and manner provided in this code.

(d) To administer oaths to persons in a proceeding pending before the officer, and in all other cases where it may be necessary in the exercise of the officer’s powers and duties.

(e) To prohibit activities that threaten access to state courthouses and court proceedings, and to prohibit interruption of judicial administration, including protecting the privilege from civil arrest at courthouses and court proceedings.

(Amended by Stats. 2019, Ch. 787, Sec. 3. (AB 668) Effective January 1, 2020.)