The recent decision by Rhode Island Gov. Lincoln Chafee to switch from Independent to the Democratic Party raises a question for students of politics. Is party switching a good idea?

One would think not. Voters from their old party may see the move as opportunistic and disloyal, and voters from their new party may be skeptical of the politician's motivations. Indeed, there are recent examples of politicians who were punished by the voters after switching parties, especially on the congressional level.

In 2009, the late Pennsylvania Sen. Arlen Specter switched his affiliation from Republican to Democratic, and then failed to win the Democratic primary the next year. In the run-up to the 2010 Florida Senate primary, Gov. Charlie Crist switched his affiliation from Republican to Independent, a move widely seen as a way of getting around a surging GOP rival, Marco Rubio. Rubio, however, easily outpaced Crist on his way to winning the Senate seat. It remains to be seen whether Crist, now a Democrat, can redeem himself by reclaiming the governorship in 2014.

However, a more thorough look through the recent ranks of party switchers demonstrates that the tactic actually has a reasonably good success rate. (For the curious, Wikipedia has an exhaustive list of party switchers.) Consider Chris Koster of Missouri, who switched from Republican to Democratic while running for attorney general in 2008. He won and was re-elected easily in 2012. "He has been accepted into the Democratic Party in Missouri without any problems," said Saint Louis University political scientist Ken Warren. "His political future seems bright."

In New Hampshire, Lou D'Allesandro served as a Republican in the state House in the mid-to-late 1990s, then switched his affiliation to Democratic and proceeded to win a state Senate seat -- a seat he's continued to hold to this day.

Want more politics news? Click here.

In Michigan, state Rep. Sal Rocca switched from Democratic to Republican in the early 1990s. He was elected to a half-dozen more terms, then was succeeded by his wife Sue and son Tory, both Republicans.

Iowa is home to recent successes as well. State Rep. Dawn Pettengill has been re-elected three times after switching from the Democrats to the Republicans in 2007. "She won this past November by about 17 points, so I would say the switch has been beneficial for her and the Republican Party," said Christopher W. Larimer, a political scientist at the University of Northern Iowa. Pettengill followed in the footsteps of state Rep. Doug Struyk who made the same switch and ended up being a key player in the GOP caucus. He left the state House to work for the GOP Secretary of State Matt Schultz, and is now chief of staff to the speaker of the house.

These examples don't necessarily share much context in common. But looking through the recent history of party switching, it's possible to identify a few themes that explain success -- or lack thereof -- in party switching.

First, let's look at what explains these candidates' success.

Surfing the Grand Realignment

If you're going to switch, make absolutely sure you're switching in the right direction. This holds true equally for red-trending or blue-trending states.

In Delaware, the Republican Party, seeking diversity, recruited an African-American woman, Margaret Rose Henry, to run for the state Senate in the 1990s. She won, but as the party grew increasingly conservative, she decided to change sides. "There was no great ceremony over her switch," said Allan Loudell, a news anchor at WDEL radio in Wilmington. "She just did. It made sense, and she seized on the perfect reasons."

In Connecticut, state Rep. Diana Urban switched from Republican to Democratic without problem, as did Oregon state Sen. Ben Westlund. He was elected to the legislature as a Republican, then became an Independent and then a Democrat. He won a race for state treasurer as a Democrat in 2008 before dying of cancer while in office.

The key for party switchers "is whether the ideology and voting record can stay stable after the switch," said University of Virginia political scientist Larry Sabato.

The South has been an especially fertile region for Democratic-to-Republican party switches. In the past few decades, the South has gone from solidly Democratic to solidly Republican. White politicians in particular have gravitated heavily toward the GOP, and many of them have faced little or no trouble remaining in office after a switch.

In Mississippi, Jeff Smith served for two decades in the House as a conservative Democrat, then switched to Independent and then Republican after the GOP recruited a candidate to run against him in 2011. He won the Republican primary and ran unopposed in the general election.

Louisiana has been a hotbed for this type of switch. Among the successful Democratic-to-Republican party switchers in Louisiana are former state House Speaker and current state Senate President John Alario, and Attorney General James (Buddy) Caldwell, who was reelected just a few months after switching in 2011.

Sometimes voters are more tolerant of party switchers seeking statewide rather than federal offices. John Kennedy (no relation to the Massachusetts Kennedys) was elected Louisiana state treasurer in 1999 as a Democrat; after a disappointing performance in a 2004 U.S. Senate race, Kennedy switched to the GOP. He was reelected as treasurer in 2007, then failed in a 2008 Senate bid, yet won another term as treasurer in 2011. Despite his losses in two federal races, Pearson Cross, a political scientist at the University of Louisiana at Lafayette, said Kennedy's "lock on the position of treasurer seems secure regardless of which party he belongs to." He's considered a contender for the 2015 gubernatorial race.

While Florida is a purple state in presidential elections, it has seen a steady stream of successful Democratic-to-Republican party switchers on the state level, starting with then-Tampa Mayor Bob Martinez in 1983, who won the governorship in 1986. Later, U.S. Rep. Andy Ireland switched and won several more terms in Congress; Dexter Lehtinen switched while serving in the Florida House and proceeded to win a state Senate seat; Charles Canady switched while serving in the Florida House and was later elected to the U.S. House; and Jim Smith was elected attorney general as a Democrat and later elected secretary of state as a Republican.

If the partisan pull is strong enough, voters may overlook even the most Machiavellian tactics. In Louisiana, U.S. Rep. Rodney Alexander signed up for re-election as a Democrat in August 2004 in the opening minutes of the candidate qualifying period, then switched to the GOP just minutes before qualifying ended, thereby ensuring that the Democrats could not run a major candidate against him. Despite some huffing and puffing, he won his first election as a Republican easily, and he's been returned to office without serious opposition ever since.

Candidates Rich Enough Not to Care About Partisan Fallout

There's really only one example in this category that comes to mind, but it's a big one: Michael Bloomberg. He switched from Democratic to Republican to run for New York City mayor in 2001, and then later became an Independent. While some New Yorkers have come to admire his indifference to party labels and technocratic approach to governance, the bottom line is that Bloomberg's vast wealth has been immeasurably valuable in his three mayoral victories.

Now that we've looked at the successes, it's time to examine the themes that point to trouble for party switchers.

Misreading the Political Tea Leaves

Sometimes, politicians say they're taking a principled stand by leaving their party. "I didn't leave the party; the party left me," the cliché goes. Sometimes this works, as when moderate Republicans Mark Parkinson and Paul Morrison became Democrats and proceeded to win races for lieutenant governor and attorney general in Kansas in 2006.

But the opposite result is at least as common. As a Republican, Bobby Neall served first as a Maryland state representative and then as Anne Arundel county executive. Later, while serving as a state senator, he switched to the Democratic Party, publicly citing ideological differences. But while Maryland as a whole is trending ever bluer, his district was not, and Neall was easily defeated for re-election by Republican Janet Greenip.

"His switch was a total misreading of that district," said one Maryland Republican. "It was very difficult for a Democrat to win that district." Something similar happened in Florida in 2006 to state Rep. Sherri McInvale. A Democrat, McInvale faced a challenge from the left in the primary. She initially survived by becoming a Republican, but she lost the general, likely because her Orlando-based district was too Democratic for a GOP candidate to win.

Distrust Within the Party Base

In North Carolina, Arthur Williams served for several terms in the state House as a Democrat before losing a close race in 2010. Redistricting changed his district, giving him a fair number of new voters, but he ran for his old seat again in 2012 anyway, this time as a Republican.

However, Williams faced two other Republicans in the primary. Despite having a bigger war chest, Williams finished second to a Tea Party activist in the primary. In the runoff, Williams lost by a wide margin. (The Democrats eventually captured the seat in the general.) Williams "was obviously not successful with his new party," said one North Carolina political observer. "While he had more money than his opponents, he clearly didn't have enough support with the conservative base of his new party."

Offending the party bases could become an increasing problem in the years ahead, experts say. "The Democratic and Republican bases are so polarized and despise the other party so much that they are very critical of someone who was recently a part of the enemy," said Nathan Gonzales, an analyst with the nonpartisan Rothenberg Political Report.

Looking Too Opportunistic

Sometimes candidates can come off as too opportunistic -- as if the election is all about them, rather than about what their constituents want. The switches by both Specter and Crist arguably fall into this category.

If the switch involves complicated, behind-the-scenes machinations, the backlash can be significant.

In Massachusetts, then-state Treasurer Tim Cahill switched from Democratic to Independent to run for governor in 2010. He drew less than 10 percent in the election -- "a major embarrassment for a candidate who was once thought to have an extremely bright future in this state," said Tufts University political scientist Jeffrey Berry. Cahill was subsequently indicted for corruption and eventually settled the case by agreeing to pay a $100,000 civil fine. "I think it's fair to conclude that things haven't gone well for him since he made his party switch," Berry said.

Meanwhile, in Michigan, Democratic state Rep. Roy Schmidt changed his affiliation to Republican on filing day, then tried to collude with GOP House Speaker Jase Bolger to undercut the Democrats' plans to run a challenger against him. "It all blew up," said Bill Ballenger, the publisher of Inside Michigan Politics. "Schmidt got creamed in November by a neophyte Democrat, and Bolger barely survived." Before leaving the House, Schmidt was reduced to making a "humble and public apology" to his colleagues.

So, what does all this mean for the man who inspired this column, Lincoln Chafee?

Conventional wisdom predicts a hard road to re-election for Chafee, due mainly to anemic approval ratings but also to his two party switches in just a few years. (He first switched from Republican to Independent after losing a U.S. Senate race, then from Independent to Democratic.) Rhode Island's openness to third-party candidates does potentially mean he could win re-election with less than 50 percent of the vote -- but first he would have to emerge from a tough primary against two potentially strong Democrats, Providence Mayor Angel Taveras and state Treasurer Gina Raimondo.

"The Democrats here are publicly welcoming him to the party, but it is like a hug without a squeeze," said Lisa Pelosi, a former aide to then-Republican Gov. Lincoln Almond.