The major media plays a much bigger role in the formation of our national politics than most people realize. The media helps define and choose the issues, and acts as gatekeeper in setting the limits for political discussion and sometimes even candidacies for public office.

The most media-savvy candidates know how to play within the media's rules, and use them to their advantage. Barack Obama is a good example of such a candidate – more on that later.

The media can also veto candidates, as in the case of John Edwards. He was not by definition a "marginal" candidate: a U.S. senator and vice-presidential candidate in the last election, at various junctures he polled better against potential Republican contenders than the other Democratic candidates. He led his rivals in introducing a serious health care plan, and arguably transformed the contest in his appeal to the Democratic base on that and other issues.

But the media rejected Edwards, by a combination of ignoring him and subjecting him to much more negative reporting than the other major contenders. The same was true in 2004 for Howard Dean, who rallied the Democratic base but found himself with five or six times as many negative articles in the media than his major democratic primary opponents.

The media does much more than directly influence the opinion of voters. Most donors, politicians, institutions and other important political participants will not waste resources on a candidate that they think is unlikely to win. They often look at how the media treats a candidate in order to make this decision. If the media does not take a candidate seriously or is obviously hostile to him or her, these potential supporters will look elsewhere.

That's not to say that Edwards would have won if the media had not rejected him; most likely he would have lost anyway. But he would have been a more serious contender.

On the other hand, Obama knew how to define his candidacy within the limits of the media's constraints and still have a mass appeal. From the beginning of his campaign he mostly avoided challenging powerful interests, and talked about "getting all sides to the table" and overcoming "decades of bitter partisanship." The media and punditocracy lap this stuff up like honey. At the same time he was able to tap into the voters' deep desire for change, with inspirational speeches, transcendental narratives, and celebrity-studded videos.

Obama showed his political genius in knowing when to jump the fence and break out of the media corral. In Iowa and New Hampshire, and even the Super-Tuesday primaries he was winning the independent and upper-income voters while losing the traditional Democratic base, including union members and the majority of Americans that do not have a college degree. He had to switch to a more populist tune or risk losing the whole game to Hillary Clinton. He did so, just in time to trounce her among almost all demographic groups (notwithstanding Saturday Night Live's joke about her majority among white women over 80) in the Wisconsin primary. One of his best applause lines in that contest was his response to Hillary Clinton's remark that "speeches don't put food on the table." Obama's reply: "You know what? NAFTA didn't put food on the table, either."

Of course, there's nothing the chattering class hates more than "populism," which they seem to define roughly as appealing to voters on the basis of their real interests, without regard to what rich people or corporate moguls think. For this, Obama has provoked some media backlash: for example, the Washington Post editorial board accused Obama of delivering an "angrier, and intellectually sloppier, message . . . of class warfare and populism," for complaining about the negative impact of trade deals such as NAFTA.

But it's a bit late for the media to reinvent Obama, after affirming his image as a post-partisan, non-ideological, charismatic uniter. If he can clinch the nomination, as seems increasingly likely, he will probably drop the populist rhetoric and once again hew closer to the media boundaries on their "sensitive" issues such as trade. In a different time and place this could risk alienating his base and suppressing turnout, but with the economy going down the tubes and -- no matter what the likely Republican nominee Senator John McCain thinks – an unpopular war, this election should be the Democrat's to lose. The gulf between Obama and McCain on these and other major issues is sufficiently large, and Obama has the intelligence, knowledge, political skills, and mass appeal to capitalize on these differences.

There will be many battles ahead, and Obama can expect a dirty, even racist campaign from various Republican groups that McCain will try to distance himself from. This campaign will make any previous comments from the Clinton campaign or photos of Obama in a turban look mild by comparison.

But Obama has played the media like a violin, and unless he stumbles, it should carry him all the way to the White House.

Mark Weisbrot is co-director of the Center for Economic and Policy Research, in Washington, D.C. He received his Ph.D. in economics from the University of Michigan. He is co-author, with Dean Baker, of Social Security: The Phony Crisis (University of Chicago Press, 2000), and has written numerous research papers on economic policy. He is also president of Just Foreign Policy.