The Republican and Democratic parties are the dominant political groups in Maryland. Before the Civil War, the Democrats drew much of their strength from the slaveholding Eastern Shore, while their opponents, the Whigs, were popular in Baltimore and other centers of antislavery activity. The collapse of the Whigs on both the national and local levels corresponded with the rise in Maryland of the Native American ("Know-Nothing") Party, whose anti-immigrant and anti-Catholic attitudes appealed to Marylanders who saw their livelihood threatened by Roman Catholic immigrants. The Know-Nothings swept Baltimore in 1855 and won the governorship in 1857; Maryland was the only state to cast its electoral votes for the Know-Nothing presidential candidate, former President Millard Fillmore, in 1856. The Native American Party declined rapidly, however, and by 1860, Maryland was back in the Democratic column, voting for the secessionist John Breckinridge.
Revelations of influence peddling and corruption afflicted both major parties during the 1970s. In 1973, Republican Spiro T. Agnew, then vice president of the US, was accused of taking payments from people who had done business with the state government while he was Baltimore County executive and then governor of Maryland until 1969. Agnew pleaded nolo contendere to a federal charge of income tax evasion and resigned from the vice-presidency on 10 October 1973. His gubernatorial successor, Democrat Marvin Mandel, was convicted of mail fraud and racketeering in 1977 for having used the powers of his office to assist the owners of a now-defunct racetrack in exchange for $350,000 in gifts and favors; he served 20 months of a 36-month prison sentence before receiving a presidential pardon in 1981.
Maryland was one of the few states carried by President Jimmy Carter in the November 1980 presidential election, but four years later the state went for President Ronald Reagan in the national Republican landslide. In 2000, Maryland gave 57% of its vote to Democrat Al Gore, 40% to Republican George W. Bush, and 3% to Green Party candidate Ralph Nader.
In the 1994 governor's race, one of the closest in Maryland history, Democrat Parris N. Glendening won; he was reelected in 1998. Republican Governor Robert L Ehrlich, Jr. was elected in 2002. The two senators from Maryland, Barbara Mikulski and Paul S. Sarbanes, both Democrats, were reelected in 1998 and 2000, respectively. In 2002 there were 3,928,223 registered voters. In 1998, 58% of registered voters were Democratic, 20% Republican, and 12% unaffiliated or members of other parties.
Following the November 2002 elections, Maryland's US congressional delegation consisted of six Democrats and two Republicans. In mid-2003 there were 33 Democrats and 14 Republicans in the state senate, and 98 Democrats and 43 Republicans in the state house. The state had 10 electoral votes in the 2000 presidential election.