Last month, he shimmied to the left on energy policy, infuriating conservatives with a plan to cap carbon emissions. Yesterday, he shuffled back to the right, demanding an end to quarter-century-old bans on offshore oil drilling.

"There are areas off our coasts that should be open to exploration and exploitation, and I hope we can take the first step by lifting the moratoria," he announced at a news conference at McCain headquarters in Crystal City.

Let's leave aside whether it's a good idea for the Republican presidential candidate to advocate the "exploitation" of the nation's coastlines. McCain said such drilling "would be very helpful in the short term in resolving our energy crisis" -- even though it takes years to get from oil exploration to production.

It was, in other words, a typical day in the life of McCain. Pulled between the need to appeal to independent voters and the need to placate the still-suspicious Republican base, McCain has been stutter-stepping his way to the GOP convention.

While probable Democratic nominee Barack Obama follows the conventional path of sprinting to the center, McCain's route has had more turns than a Macarena: slide to the right on judges and guns, jump to the left on climate change and foreign alliances, pivot to the right on taxes and Iraq.

A glance at the new Washington Post-ABC News poll explains McCain's back-and-forth. Fifty-four percent of Obama backers are "very enthusiastic" -- giving him plenty of room to run to the middle. But just 17 percent of McCain supporters feel that way. Only 13 percent of conservatives are very enthusiastic about McCain, compared with nearly half of liberals who feel strongly about Obama.

The candidate put a happy face on the situation when a questioner at yesterday's news conference asked about the "difficulties you're having in unifying the party."

"Actually, according to all the polls, we see that we have as large a percentage of the Republican Party that is supporting me as President Bush had in '04 and 2000," he said. "I'm happy with the degree of unity that our party has. . . . We'll be fine over time. It always takes time."

Time, and some nice dance moves -- many of which were on display at McCain headquarters for yesterday's session with reporters. The man once celebrated for his informality with reporters emerged in a severe gray suit and stood in front of four American flags, flared with the help of adhesive tape. He scolded one reporter for asking a question without raising her hand. One star correspondent, arriving a few minutes late for the event, was forced to wait outside until McCain finished.

He waltzed to the right on Iraq ("I am convinced that we are on the path to victory!") and economics ("He wants to raise taxes; I want to lower them"). He swung to the left on his bipartisan achievements: "I worked with Senator Kennedy on immigration. I worked with Senator Feingold on campaign finance reform. . . . I worked with Senator Dorgan in the investigation of the Abramoff scandal." He promenaded back to the right on guns and God: "I won't tell them that, in small towns across America and Pennsylvania, that they are bitter . . . so therefore they embrace religion and the Second Amendment."

And sometimes he tried to have it both ways. He spoke up for the "unique status of marriage between man and woman," then suggested he would let states make their own choices, saying, "I also feel that the people of California will probably make a decision on this."

He also explained an aborted fundraising appearance at the home of oilman Clayton Williams, whose political aspirations collapsed years ago when he likened rape to bad weather. McCain said he canceled the appearance but would keep the money raised, because "the people that contributed are supporters of mine, not supporters of his."

On energy policy, McCain faced the most complex two-step of all. In May, he antagonized conservatives with his cap-and-trade plan for carbon ("It's really a cap-and-kill-the-economy plan," Larry Kudlow wrote for National Review) and renewed his opposition to drilling in the Arctic National Wildlife Refuge and other sensitive sites ("You know, a lot of people aren't going to like that," Fox News's Bill O'Reilly informed him).

That created the need for yesterday's allemande right. During his last run for the presidency, in 1999, McCain supported the drilling moratorium, and he scolded the "special interests in Washington" that sought offshore drilling leases. Yesterday, he announced that those very same "moratoria should be lifted" and proposed incentives for the states "in the form of tangible financial rewards, if the states decide to lift those moratoriums."

Fox's Carl Cameron was skeptical about McCain's conversion. He pointed out that McCain had already aggravated "an awful lot of Republicans" by ruling out oil drilling in Alaska and other places. "To what extent is the lifting of the moratoria addressing that?" he asked. "And how do you persuade Republicans that you are not in their face on what they think is an important part of a domestic energy plan?"

McCain smiled. "I try not to get in their face," he said. And that requires fancy footwork.