Following the 2010 census, Utah earned an additional congressional seat. Republican state lawmakers who dominated the redistricting process divided Matheson's district into four parts. Analysts said that nullified his incumbent advantage. None of the new districts have more than 38 percent of his old territory.
"Our legislature was obviously trying to beat me by gerrymandering the district," Matheson said.
Republican leaders have said the GOP-led redistricting commission was careful to ensure the process was done properly. The panel was set up to include 14 Republicans and five Democrats.
After new redistricting maps took effect in 2012, Matheson chose to represent the newly formed 4th District, which seemed to be the friendliest for Democrats. Still, the new district had only about 25 percent of the constituents from his old district, meaning he lost thousands of voters who had helped keep him in office for a decade.
The new district was altered so Matheson had to win over new voters who were more inclined to support the party rather than the candidate, said Tim Chambless of the University of Utah's Hinckley Institute of Politics.
Matheson won the new district but just barely. He held off Republican Mia Love by fewer than 800 votes in the most expensive congressional race in state history. Matheson spent $2.35 million and outside groups backing him poured in another $3.2 million. By contrast, Love spent $2.25 million and groups supporting her spent $3.4 million.
"That election really came out to a coin toss," said Damon Cann, a political scientist at Utah State University. "If you rerun the whole thing all over again, it's a 50-50 chance that he loses."
Before the districts were reshaped, Matheson had comfortably won his previous four elections in the 2nd District, even when tea partiers led a big GOP turnout in 2010.
Matheson said this week that his polling numbers showed he would have won again in November. The 2012 race was tougher than it would have been otherwise because the district was new and Republican voters were out in force to support presidential candidate Mitt Romney, he said.
He reiterated that he's stepping down because he's ready to do something else after 14 years in Congress. He hasn't ruled out a future run for a different office.
Matheson, a fiscally conservative "Blue Dog" Democrat and son of a popular governor, proved that a popular candidate with incumbency can overcome districts stacked in favor of the opposing party, Cann said. But with Matheson leaving office, Utah Democrats face long odds to get a candidate back in Congress, he said.
"It's hard to imagine, barring a major scandal or some such thing, Utah electing a Democrat until after the next redistricting," Cann said.