28 U.S.C. § 631 : US Code - Section 631: Appointment and tenure

      (a) The judges of each United States district court and the
    district courts of the Virgin Islands, Guam, and the Northern
    Mariana Islands shall appoint United States magistrate judges in
    such numbers and to serve at such locations within the judicial
    districts as the Judicial Conference may determine under this
    chapter. In the case of a magistrate judge appointed by the
    district court of the Virgin Islands, Guam, or the Northern Mariana
    Islands, this chapter shall apply as though the court appointing
    such a magistrate judge were a United States district court. Where
    there is more than one judge of a district court, the appointment,
    whether an original appointment or a reappointment, shall be by the
    concurrence of a majority of all the judges of such district court,
    and when there is no such concurrence, then by the chief judge.
    Where the conference deems it desirable, a magistrate judge may be
    designated to serve in one or more districts adjoining the district
    for which he is appointed. Such a designation shall be made by the
    concurrence of a majority of the judges of each of the district
    courts involved and shall specify the duties to be performed by the
    magistrate judge in the adjoining district or districts.
      (b) No individual may be appointed or reappointed to serve as a
    magistrate judge under this chapter unless:
      (1) He has been for at least five years a member in good standing
    of the bar of the highest court of a State, the District of
    Columbia, the Commonwealth of Puerto Rico, the Territory of Guam,
    the Commonwealth of the Northern Mariana Islands, or the Virgin
    Islands of the United States, except that an individual who does
    not meet the bar membership requirements of this paragraph may be
    appointed and serve as a part-time magistrate judge if the
    appointing court or courts and the conference find that no
    qualified individual who is a member of the bar is available to
    serve at a specific location;
      (2) He is determined by the appointing district court or courts
    to be competent to perform the duties of the office;
      (3) In the case of an individual appointed to serve in a national
    park, he resides within the exterior boundaries of that park, or at
    some place reasonably adjacent thereto;
      (4) He is not related by blood or marriage to a judge of the
    appointing court or courts at the time of his initial appointment;
    and
      (5) He is selected pursuant to standards and procedures
    promulgated by the Judicial Conference of the United States. Such
    standards and procedures shall contain provision for public notice
    of all vacancies in magistrate judge positions and for the
    establishment by the district courts of merit selection panels,
    composed of residents of the individual judicial districts, to
    assist the courts in identifying and recommending persons who are
    best qualified to fill such positions.
      (c) A magistrate judge may hold no other civil or military office
    or employment under the United States: Provided, however, That,
    with the approval of the conference, a part-time referee in
    bankruptcy or a clerk or deputy clerk of a court of the United
    States may be appointed and serve as a part-time United States
    magistrate judge, but the conference shall fix the aggregate amount
    of compensation to be received for performing the duties of part-
    time magistrate judge and part-time referee in bankruptcy, clerk
    or deputy clerk: And provided further, That retired officers and
    retired enlisted personnel of the Regular and Reserve components of
    the Army, Navy, Air Force, Marine Corps, and Coast Guard, members
    of the Reserve components of the Army, Navy, Air Force, Marine
    Corps, and Coast Guard, and members of the Army National Guard of
    the United States, the Air National Guard of the United States, and
    the Naval Militia and of the National Guard of a State, territory,
    or the District of Columbia, except the National Guard disbursing
    officers who are on a full-time salary basis, may be appointed and
    serve as United States magistrate judges.
      (d) Except as otherwise provided in sections 375 and 636(h) of
    this title, no individual may serve under this chapter after having
    attained the age of seventy years: Provided, however, That upon a
    majority vote of all the judges of the appointing court or courts,
    which is taken upon the magistrate judge's attaining age seventy
    and upon each subsequent anniversary thereof, a magistrate judge
    who has attained the age of seventy years may continue to serve and
    may be reappointed under this chapter.
      (e) The appointment of any individual as a full-time magistrate
    judge shall be for a term of eight years, and the appointment of
    any individuals as a part-time magistrate judge shall be for a term
    of four years, except that the term of a full-time or part-time
    magistrate judge appointed under subsection (k) (!1) shall expire
    upon - 

        (1) the expiration of the absent magistrate judge's term,
        (2) the reinstatement of the absent magistrate judge in regular
      service in office as a magistrate judge,
        (3) the failure of the absent magistrate judge to make timely
      application under subsection (j) (!1) of this section for
      reinstatement in regular service in office as a magistrate judge
      after discharge or release from military service,
        (4) the death or resignation of the absent magistrate judge, or
        (5) the removal from office of the absent magistrate judge
      pursuant to subsection (i) of this section,

    whichever may first occur.
      (f) Upon the expiration of his term, a magistrate judge may, by a
    majority vote of the judges of the appointing district court or
    courts and with the approval of the judicial council of the
    circuit, continue to perform the duties of his office until his
    successor is appointed, or for 180 days after the date of the
    expiration of the magistrate judge's term, whichever is earlier.
      (g) Each individual appointed as a magistrate judge under this
    section shall take the oath or affirmation prescribed by section
    453 of this title before performing the duties of his office.
      (h) Each appointment made by a judge or judges of a district
    court shall be entered of record in such court, and notice of such
    appointment shall be given at once by the clerk of that court to
    the Director.
      (i) Removal of a magistrate judge during the term for which he is
    appointed shall be only for incompetency, misconduct, neglect of
    duty, or physical or mental disability, but a magistrate judge's
    office shall be terminated if the conference determines that the
    services performed by his office are no longer needed. Removal
    shall be by the judges of the district court for the judicial
    district in which the magistrate judge serves; where there is more
    than one judge of a district court, removal shall not occur unless
    a majority of all the judges of such court concur in the order of
    removal; and when there is a tie vote of the judges of the district
    court on the question of the removal or retention in office of a
    magistrate judge, then removal shall be only by a concurrence of a
    majority of all the judges of the council. In the case of a
    magistrate judge appointed under the third sentence of subsection
    (a) of this section, removal shall not occur unless a majority of
    all the judges of the appointing district courts concur in the
    order of removal; and where there is a tie vote on the question of
    the removal or retention in office of a magistrate judge, then
    removal shall be only by a concurrence of a majority of all the
    judges of the council or councils. Before any order or removal
    shall be entered, a full specification of the charges shall be
    furnished to the magistrate judge, and he shall be accorded by the
    judge or judges of the removing court, courts, council, or councils
    an opportunity to be heard on the charges.
      (j) Upon the grant by the appropriate district court or courts of
    a leave of absence to a magistrate judge entitled to such relief
    under chapter 43 of title 38, such court or courts may proceed to
    appoint, in the manner specified in subsection (a) of this section,
    another magistrate judge, qualified for appointment and service
    under subsections (b), (c), and (d) of this section, who shall
    serve for the period specified in subsection (e) of this section.
      (k) A United States magistrate judge appointed under this chapter
    shall be exempt from the provisions of subchapter I of chapter 63
    of title 5.