Nominations for public offices that are filled by elections governed by this article shall be made: (1) by party primary, for candidates of a principal political party; (2) by petition, for candidates not affiliated with any political party; or (3) in accordance with the constitution and bylaws of the political party, for candidates of a political party that does not nominate by party primary.
Maryland Legal Code