This week was a reminder of the importance of a state or congressional district's political lean when gauging whether an upset there is possible:

* In South Carolina, former governor Mark Sanford has been fighting for his political life after a string of bad headlines that would have sunk most other candidates' hopes weeks ago.  This week, the state's two U.S. senators and Republican Gov. Nikki Haley rallied to his side, something they would not have done if he did not stand a reasonable chance of winning. Why does Sanford still have a chance? A big reason is the conservative lean of his district, which gave presidential candidate Mitt Romney nearly 60 percent of the vote in 2012.

* In Massachusetts, the GOP's nomination of political outsider Gabriel Gomez to the Senate boosted Republican enthusiasm about a race Democrats are heavy favorites to win. Memories of  Scott Brown's stunning upset three years ago prompted a round of he's-no-Scott-Brown claims from Democrats, and talking points from Republicans about where Gomez might be able to repeat some of Brown's success. As we've written, Brown's win was due a to a perfect storm of factors. So, given how deep blue Massachusetts is, Rep. Ed Markey (D) is the clear favorite unless a number of indicators begin piling up suggesting the race is turning in Gomez's favor.

And now, to the Line! Below we rank the top five races of 2013. The marquee matchup with the most at stake is number one:

5. Boston mayor (Democratic-controlled): We're looking at a crowded race here, with two dozen potential candidates applying for nomination papers. The city hasn't had an open mayor's race since 1983, so competition will be strong to fill the job of retiring Mayor Thomas Menino. Among the contenders -- five city councilors, State Rep. Martin Walsh, Suffolk District Attorney Daniel Conley, ex-Menino aide Charlotte Golar Richie, community organizer Bill Walczak and Touch FM co-founders Charles Clemons and John Laing. Each candidate has until May 21 to file 3,000 signatures from registered voters; that might narrow the field a bit. (Previous ranking: 4)

4. Massachusetts Senate special election (D): Markey has been the choice of the Democratic establishment from day one of his campaign, and so far he's made no major missteps. The nomination of Gomez, who has an intriguing profile, makes the sprint toward June 25 more interesting than it would have been with a different GOP nominee. A survey from Democratic automated pollster Public Policy Polling released Friday showed a tight race. But a lot has to go right for Gomez (and wrong for Markey) before Republicans can start seriously talking about a repeat of Brown's implausible 2010 victory. (Previous ranking: 5)

3. New York City mayor (Independent-controlled): Political drama junkies are still praying for Democratic ex-congressman Anthony Weiner to get in the race. A poll shows him in second place -- but with high name recognition and unfavorable numbers that give him little room to grow. The recent developments that really matter are Democratic frontrunner Christine Quinn's moves to protect her left flank. She's struck a deal on paid sick leave after over two years of delay and suggested the police's use of stop-and-frisk  was too high to be "constitutionally sound." Both stances put her at odds with Mayor Michael Bloomberg and help her defend herself from liberal primary challengers. If Weiner does run, he'll pull some votes from both right and left, and Quinn needs to shore up liberal support. (Previous ranking: 2)

2. South Carolina 1st District special election (Republican-controlled): It's going to be a very interesting final weekend of campaigning in the Lowcountry. Elizabeth Colbert Busch has put herself in a solid position, but Sanford isn't finished yet. He got a late financial boost when Haley helped him raise money this week, something he badly needed, as Democratic outside groups have been barraging the former governor with negative ads, while he's received no help from national Republicans. If this district weren't so Republican, Sanford wouldn't have the chance he has right now. (Previous ranking: 3)

1. Virginia governor (R): In case you forgot, the past few weeks reminded us that both Attorney General Ken Cuccinelli (R) and former DNC chairman Terry McAuliffe both come with boatloads of baggage. Cuccinelli failed to disclose gifts from the major donor whose relationship with Gov. Bob McDonnell (R) has piqued the interest of the FBI, as well as stock in that donor's company. McAuliffe faced scrutiny over his role in (and quiet departure from) an electric car company, not to mention some unflattering anecdotes from his own memoir. These two contenders for governor are basically an opposition researcher's dream, which is why -- barring a smoking gun on one side or the other -- this race will be neck-and-neck until the end. (Previous ranking: 1)