John McCain has been purging lobbyists from his campaign trying to reclaim the mantle of political reformer, but there’s one lobbyist whose role as a key economic adviser makes him almost untouchable despite ties to the sub-prime debacle, links to the Enron disaster and alleged evasion of ethics rules.

Former Sen. Phil Gramm, who was listed as a lobbyist for banking giant UBS as recently as December 2007, has emerged as what Fortune magazine calls “McCain’s econ brain,” filling McCain’s acknowledged void on economic expertise (“I don’t know as much about the economy as I should”).

Recognized as one of McCain’s closest friends in politics, Gramm began advising McCain in 2005 when the Arizona senator indicated he planned to run for President. Gramm, a Texas Republican, also was credited with helping salvage McCain’s campaign from disarray in 2007.

More recently, McCain reportedly turned to Gramm for help in fashioning a March 26, 2008, policy speech on the mortgage crisis — a plan that critics faulted for providing only modest help for families facing foreclosures.

Now, however, Gramm’s work for the Swiss-based investment bank UBS is coming under scrutiny as contradicting McCain’s policy that bars lobbyists from his campaign.

Gramm started work at UBS as a vice chairman in January 2003, immediately after leaving Congress. A month earlier, he had shifted $2 million in campaign contributions from the Friends of Phil Gramm Political Action Committee to a UBS PAC, a move that let the bank increase its visibility with lawmakers.

“I think [UBS] understands the importance of having access to lawmakers, and the presence of Gramm and the PAC could accomplish this goal,” commented John Samples, director of the libertarian Cato Institute’s Center for Representative Government, in late 2002.

“While the amount given by Gramm to start the PAC is relatively small when compared to other PACs, it’s important seed money for UBS,” Samples wrote in an article for Wall Street Letter on Dec. 9, 2002.

The money transfer was seen as both benefiting Gramm’s new boss and advancing his anti-regulatory agenda as he moved to the private sector.

“Much like its competitors in the brokerage industry, [UBS] is most interested in preventing Congress from passing legislation that would restrict the industry,” an unnamed lobbyist told Wall Street Letter. “The firms want to make sure they don’t get hit with another version of Sarbanes-Oxley,” the tougher corporate disclosure law passed after the Enron collapse.

In 2002, Gramm, whose wife Wendy served on Enron’s board of directors, had opposed Sarbanes-Oxley, which was designed to hold executives accountable for inaccuracies in financial reports like those that hid Enron’s mounting debt.

The Wall Street Letter also quoted a former Securities and Exchange Commission official as saying that UBS’s goal in tapping Gramm was “to establish a sustained, long-term effort to cultivate influence in the nation’s capital by contributing money to candidates on a consistent basis.”

This former SEC official, who also had turned to lobbying, added: “You can’t be in the game of political influence for the short term. This is a good start for” UBS, relying on Gramm, a long-time fixture of Washington politics.

Texas Financial Scheme

In his work at UBS, Gramm also made use of his deep roots in Texas politics

In mid-2003, Gramm began floating a UBS-backed idea of raising money for the $95 billion Texas Teacher Retirement System through the purchase of retirees’ life insurance policies and the sale of billions of dollars in bonds.

Gramm met with Texas Gov. Rick Perry, Insurance Commissioner Jose Montemayor and state pension officials to discuss the proposal, which Gramm claimed could add as much as $500 million to teachers’ pension funds risk free, according to documents.

Texas Democrats derided the UBS proposal after a review determined that UBS stood to profit far more than the Teachers Retirement System if the plan were implemented.

Furthermore, Democrats found that Gramm’s PAC had donated $612,000 to Gov. Perry during the 2002 election cycle.

The Texas controversy expanded later when it was learned that a Teachers Retirement System trustee had retired from UBS in January 2004, the same month Gramm began an aggressive drive to get Perry to back the proposal.

Kelly Fero, a Democratic Party strategist, told the Fort Worth Star Telegram that “the conflict for Perry is that he’s trying to steer retired teacher benefits … to his political pal Phil Gramm, who gave him hundreds of thousands of dollars in ’02, and he has appointed an employee of UBS to the TRS board to help make this whole scam possible.”

Democratic Chairman Charles Soechting added, “The plan was a “huge, get-rich-quick scheme on the part of Phil Gramm and his buddies” in the investment and insurance industries, according to a Jan. 11, 2004, story in the Houston Chronicle.

Democrats soon discovered that Gramm hadn’t registered as a lobbyist in Texas as would be required by state law before he could seek changes in policies. The Texas Democratic Party filed a complaint against Gramm with Travis County prosecutors and the state ethics commission.

It is unclear what happened with the ethics complaints. Neither the Travis County prosecutors nor the Texas Ethics Commission would comment on the outcome of their inquiries. A review of public records on the Web sites of both agencies failed to turn up a final ruling on the probe.

Representatives for McCain and Gramm did not return repeated calls for comment. A spokesman for UBS declined to discuss the matter. When asked by reporters about Gramm’s mixed role as a paid UBS lobbyist and an unpaid campaign adviser, McCain has staunchly defended his friend’s ethics.

Sub-Prime Complaints

On another front, UBS is currently under investigation by William Galvin, Massachusetts’ secretary of the commonwealth.

Galvin subpoenaed UBS and Bear Stearns after one of its analysts issued a research report that upgraded the stock of New Century Financial, a company that provides sub-prime mortgages to low-income homebuyers, from “underperform” to “peer-perform.”

The stock spiked on the news. But less than two months later New Century filed for bankruptcy protection due in large part to the massive number of borrowers who were defaulting on their loans.

It turned out that UBS and Bear Stearns, which recently was spared bankruptcy by a federal bailout and an arranged sale to JPMorgan Chase, financed New Century’s mortgage operations.

Gavin demanded that UBS and Bear Stearns turn over their research documents regarding New Century.

Galvin alleged that Bear Stearns and UBS violated a 2003 settlement barring self-interested stock research, an agreement that followed the Nasdaq crash of 2000. Wall Street firms also paid hefty fines after regulators accused analysts of writing biased research reports to win lucrative investment deals from companies the analysts covered.

As part of the global settlement, firms promised to keep their sell-side operations away from the investment banking side.

“Recent revelations that research analysts issued positive reports on mortgage lenders … even as those companies faced more and more defaults suggests that the commitment of 2003 has not been met,” Galvin said in a prepared statement.

Gramm’s Baggage

There’s still more baggage that comes with Gramm’s connection to the McCain campaign, especially as it tries to reestablish McCain’s reputation as a maverick opposed to the corrupt ways of Washington.

As chairman of the Senate Banking Committee in 1999, Gramm pushed through legislation undoing the Depression-era Glass-Steagall Act by eliminating the wall between heavily regulated commercial banks and lightly regulated investment banks.

Some economists blame this deregulation for contributing to the rapid growth in sub-prime mortgage lending, its securitization into investment bundles and thus the recent crisis in the mortgage markets that has pushed the U.S. economy to the brink of a major recession.

In 2000, Gramm shepherded through another anti-regulatory law that lightened up government oversight of energy-commodity trading. Houston-based Enron and other energy traders exploited the changes in a scheme to drive up California energy prices and gouge consumers out of an estimated $40 billion.

Nevertheless, McCain has made clear he won’t throw his old friend over the side. There’s even talk that Gramm could expect an appointment as Treasury Secretary in a McCain administration.

Plus, there are positive political aspects. Gramm’s anti-regulatory and pro-business record has bolstered McCain’s standing with economic conservatives, an important Republican constituency.

So, despite Gramm’s troublesome connections to UBS lobbying, the sub-prime mess and the Enron scandal, McCain’s “econ brain” appears to remain firmly in place.