Political contributions from deceased individuals totaled nearly $600,000 over the last few years, according to a USA Today analysis.

Since the start of 2009, 32 people listed as dead on federal campaign documents gave $586,000 to presidential and congressional candidates, USA Today found. Though that may sound impossible, or at the least nefarious, it's technically legal.

Indeed, there are acceptable ways for people to donate money after their deaths. However, the cases are extremely rare and are, by their nature, "potentially problematic," Larry Noble, an attorney and former head of the Center for Responsive Politics, told Open Secrets back in 2011.

"Generally, the dead aren't supposed to give," he said.

So how do they pull it off? People can establish charitable trusts prior to their deaths with specific instructions on how to spend the money. Political donations from such trusts, called testamentary bequests, are subject to the same restrictions imposed on donations from the living.

For example, the donations can't be made in someone else's name, and they must total less than $5,200 for a single candidate in an election cycle, or less than $32,400 for a party in a single year. People in charge of the trusts can't donate to a PAC they're affiliated with.

A pending federal case is challenging the contribution limits on donations from the deceased. In that case, a Tennessee man named Raymond Burrington left $217,000 to the Libertarian National Committee in his will. The Federal Election Commission forced the LNC to accept the money in small chunks to comply with the contribution limits, prompting the party to file suit asking that they be allowed to obtain all the money at once.

Though campaign financing from beyond the grave is rare, it is not new. A previous USA Today report found that between 2003 and 2007, 160 dead people gave $540,000 to federal campaigns.