Former New York City Mayor Giuliani, who spent months atop national polls but never finished better than third in any contest, quit the race at a Simi Valley news conference, where he hailed the Arizona senator as a friend and an "American hero."
"John McCain is the most qualified candidate to be the next commander in chief of the United States," Giuliani said, as McCain stood next to him.
The endorsements came as the GOP hopefuls pivoted into a vastly more complicated fight for their party's presidential nomination, an unprecedented day of balloting in 21 states sprawled across three times zones and more than 3,000 miles.
Among the states voting Tuesday are California, Illinois, Georgia, New York, New Jersey and Massachusetts. At stake are 1,081 delegates to the party's summer convention; it takes 1,191 to win the nomination.
"I don't know how you pick your way through it," said Andrew J. Taylor, a political scientist at North Carolina State University. "The sheer size . . . it makes you want to sit down and catch your breath. And it makes your head spin. It makes my head spin, and I don't have to do it."
McCain, the winner of Florida's primary, sought Wednesday to translate his momentum into money, something that has been in short supply for the senator.
Former Massachusetts Gov. Mitt Romney planned to focus on caucus states where he could apply his organizational prowess.
Former Arkansas Gov. Mike Huckabee clung to the waning hope that a muddled picture would allow him to prevail at a contested Republican convention this summer.
The exit of Giuliani not only thinned the field but eliminated McCain's chief competitor for the votes of moderate Republicans, which could be especially helpful in California, New York, Connecticut and New Jersey.
"Until a few days ago, both the front-runners had an albatross on their back. Now [Giuliani] is not only dropping out but endorsing him," said Dan Schnur, a GOP strategist who worked for McCain in his 2000 race but is neutral this time.
By contrast, Schnur said, Romney will continue to vie with Huckabee for the support of social conservatives.
Still, neither Schnur nor others expected the contest to be settled the morning of Feb. 6.
"Even though McCain goes into next week as a strong front-runner, it's hard to see him sweeping a map that's that big and that broad," Schnur said. "Barring a complete meltdown, Romney can probably pick off enough states to claim a split decision and keep going forward."
Forced to negotiate such an unwieldy terrain, tacticians for the three major candidates were poring over maps and precinct data, targeting pockets of perceived strength and scratching off states that seemed too expensive for advertising or politically too far out of reach.
Despite his advantages, money remains a concern for McCain, whose campaign faced a $4.5-million debt at the end of 2007. Since then, he has stepped up fundraising; aides said he collected more in January than he did in the final three months of last year.
"Money is momentum and vice versa," said campaign manager Rick Davis.
Over the next six days, McCain intends to pair campaign stops with fundraisers in Los Angeles, San Francisco and on the East Coast. He will also seek to capitalize on his front-runner status by ginning up free publicity.
"We are going to try to be communicating to as many people as we can, and the way to do that is through television," said campaign advisor Steve Schmidt. Between now and Tuesday, Schmidt said, McCain will try to land one-on-one interviews with local TV news anchors "in as many markets as possible."