(a) (1) This subsection does not apply to members of the General Assembly.
(2) Except as provided in paragraph (3) of this subsection, an official or employee may not, for contingent compensation, assist or represent a party in any matter before or involving any unit of the State or a political subdivision of the State.
(3) Paragraph (2) of this subsection does not apply to assistance to or representation of a party:
(i) in a judicial or quasi–judicial proceeding, including a proceeding before an administrative law judge in the Office of Administrative Hearings, or a matter preliminary, incidental, or collateral to a judicial or quasi–judicial proceeding; or
(ii) in a matter before or involving the Workers’ Compensation Commission, the Maryland Automobile Insurance Fund, or the Criminal Injuries Compensation Board.
(b) (1) Except as provided in paragraph (2) of this subsection, a member of the General Assembly may not, for compensation, assist or represent a party in any matter before or involving any unit of the State or a political subdivision of the State.
(2) Paragraph (1) of this subsection does not apply to assistance to or representation of a party:
(i) in matters relating to the performance of ministerial acts by a governmental unit;
(ii) in matters involving the member’s regular business, employment, or profession, in which contact with a governmental unit:
1. is an incidental part of the business, employment, or profession;
2. is made in the manner that is customary for persons in that business, employment, or profession; and
3. is not for contingent compensation;
(iii) in a judicial or quasi–judicial proceeding, including a proceeding before an administrative law judge in the Office of Administrative Hearings, or a matter preliminary, incidental, or collateral to a judicial or quasi–judicial proceeding;
(iv) in a matter before or involving the Workers’ Compensation Commission, the Maryland Automobile Insurance Fund, or the Criminal Injuries Compensation Board; or
(v) in a matter in which the assistance or representation, other than for contingent compensation, was commenced by the member of the General Assembly before:
1. the member filed a certificate of candidacy for election to the General Assembly at a time when the member was not an incumbent; or
2. if the member was appointed to fill a vacancy, the date of appointment.
(c) (1) A member of the General Assembly may not assist or represent a person, including himself or herself, for compensation before a State or local governmental agency in any matter involving:
(i) procurement; or
(ii) the adoption of regulations.
(2) Paragraph (1) of this subsection does not apply to an administrative proceeding conducted in accordance with Title 10, Subtitle 2 of the State Government Article.
(d) (1) Except for a former member of the General Assembly, who shall be subject to the restrictions provided under paragraph (2) of this subsection, a former official or employee may not assist or represent a party, other than the State, in a case, a contract, or any other specific matter for compensation if:
(i) the matter involves State government; and
(ii) the former official or employee participated significantly in the matter as an official or employee.
(2) (i) In this paragraph, “legislative action” does not include testimony or other advocacy in an official capacity as a member of the General Assembly before a unit of State or local government.
(ii) Except as provided in subparagraph (iii) of this paragraph:
1. a former member of the General Assembly may not assist or represent another party for compensation in a matter that is the subject of legislative action for one calendar year from the date the member leaves office; and
2. a former Governor, Lieutenant Governor, Attorney General, Comptroller, or State Treasurer may not assist or represent another party for compensation in a matter that is the subject of legislative action for one calendar year from the date the official leaves State office.
(iii) The limitation under subparagraph (ii) of this paragraph on representation by a former member of the General Assembly or by a former Governor, Lieutenant Governor, Attorney General, Comptroller, or State Treasurer does not apply to representation of a municipal corporation, county, or State governmental entity.
(e) Notwithstanding subsection (a)(3) of this section or § 5–502 of this subtitle, a full–time official or employee in the Judicial Branch may not represent a party before a court or unit of the Judicial Branch except in the discharge of official duties.