COLLEGE PARK, Maryland — While Maryland voted for the Democratic candidate in 2016 for the seventh straight presidential election, a deepening Republican loyalty in more rural areas of the state indicates increased polarization throughout Maryland, a Capital News Service analysis found.

While liberal-leaning urban areas helped Hillary Clinton secure Maryland’s 10 electoral votes and Democratic candidates won all but one U.S. House seat Tuesday, the state’s liberal base didn’t perform according to expectations.

Donald Trump received a higher percentage of votes than Mitt Romney in 15 of the 18 Maryland counties that voted Republican in 2012, while Clinton failed to expand on President Barack Obama’s coalition from 2012.

Of the six counties that voted Democratic four years ago, only two counties — Howard and Montgomery — supported Clinton at higher rates than they supported Obama.

Maryland counties voted the same way in 2016 as in 2012, except two that flipped allegiances. Unlike the last presidential election, Anne Arundel County voted Democratic by a small margin, yet Somerset County voted Republican by a significantly larger margin.

Maryland House Speaker Mike Busch, D-Anne Arundel, attributed the change in his county to the Republican candidate.

“Citizens were turned off by the rhetoric and bigotry of Donald Trump and they voted for Hillary,” Busch said.

And while Somerset County has “always been Republican,” said Matt Adams, chairman of the Somerset County Republicans, the county shifted nine points to the Republican side since 2012.

In the past, the county has appeared Democratic because of the presence of the University of Maryland Eastern Shore, in Princess Anne, Adams said.

“(The students) don’t live here,” he said. “They came from somewhere, (where) they truly live, and they should vote absentee in our opinion from the county in which they lived in prior to going to college.”

In the last weeks of voter registration in the state of Maryland, employees at the University of Maryland Eastern Shore — a historically black college — arranged for voting registration officials to visit campus, where about 200 students were able to register, said William Robinson, the director of public relations at the university.

On Election Day, about 150 students took a campus shuttle bus to the nearest polling places, and about 125 other students used their own transportation, Robinson said.

Rep. Andy Harris, R-Cockeysville, was re-elected as the representative for Maryland’s 1st Congressional District, which includes Somerset County, and will remain the only Republican representative from the state.

“The whole first congressional district has been gerrymandered to be the Republican district in the state of Maryland, so Andy always does well here,” Adams said.

Harris’s conservative views have mobilized Republicans, he said.

In his victory speech at the Maryland Republican headquarters, Harris said he looked forward to bringing “Maryland back to the red column.”

“In one of my precincts up in Baltimore County — Catonsville — there was a line around the corner at 10 p.m. at night because people can hardly wait to get out and vote for Donald Trump and drain the swamp in Washington,” he said Tuesday night.

A 2014 Washington Post article identified both Maryland and North Carolina as tied for the title of most-gerrymandered state.

“How the districts are drawn really gives the impression that Republicans live in certain places and Democrats live in other places, and while there seems to be some trends in that respect — Montgomery County for example is very heavily Democratic — I think it distorts our perception somewhat,” said Carin Robinson, an associate professor of political science at Hood College in Frederick.

While the numbers signal a stark polarization in Maryland between political parties, it may not be an accurate representation, she said.

“There is polarization, but redistricting and how the congressional lines are drawn accentuates it and over-emphasizes it in a way that probably doesn’t highlight the fact that we still have diversity within the state,” Robinson said.

Gerrymandering has eradicated battleground districts in the state, which works in favor of Democrats, said Delegate Herbert McMillan, R-Anne Arundel.

“Basically, I see gerrymandering is contributing a lot to politics in Maryland,” he said. “It’s really sad. What happens is in the primary, there is no middle left.”

Councilman Michael Peroutka, R-Anne Arundel, said he thinks voters had their own agendas and motives for the county’s blue vote.

“I would just speculate that there are so many people in our county who work directly for, or work as, a contractor for the federal government,” Peroutka said. “I think they vote Democrat because they are voting for a big spigot of federal spending that would stay on.”

Other factors, such as shifting demographics in gerrymandered districts, may also contribute to some counties in Maryland becoming more liberal while other counties are growing more conservative, said Gregory Kline, co-founder of Red Maryland, a conservative news outlet.

“That realignment has taken hold over the last couple of decades,” he said. “In more conservative counties…there’s more locally elected Republican officials. It just kind of feeds on itself.”

Maryland state Sen. James Mathias Jr., D-Somerset, said his job will not change just because counties are becoming more stratified.

“The most important person is the constituents,” he said. “(I will) stay true to constituents, stay true to my beliefs, but adapt to the environment and circumstances.”