Sometimes in politics and legislation, whether you win is less important than how you win.

That's the dilemma facing House Speaker John Boehner as he tries to round up the votes to pass a fast-approaching spending compromise and avert a partial government shutdown by week's end.

Boehner, R-Ohio, wants the overwhelming majority of those votes to come from his fellow Republicans, even if dozens of easily attainable Democratic votes could help carry the budget bill to victory.

The goal complicates Boehner's task, and possibly could push the bill farther to the right. It motivates him to battle for the votes of conservative Republicans who are demanding deeper spending cuts, and greater changes to social issues such as abortion access, than the Democratic-controlled Senate and President Barack Obama say they can accept.

If Boehner can argue convincingly that it's the only route to House passage, Democrats conceivably could yield on some points they might otherwise win. At the same time, however, Boehner is trying to persuade Republicans that some compromise is inevitable.

"We control one-half of one-third of the government," he said last week. "We can't impose our will on the Senate."

Eventually, both parties must decide where to draw the line in negotiations and whether to risk a government shutdown that could trigger unpredictable political fallout.

Some congressional veterans say Boehner is taking the only realistic approach for a speaker who wants to stay in power. If he cuts a deal that relies heavily on Democrats' votes, he could alienate scores of House Republicans, who might in turn start seeking a new leader.

"You always have to please at least half your caucus, plus one," said John Feehery, a top aide to the previous Republican speaker, Rep. Dennis Hastert of Illinois.

Hastert had a "majority of the majority" rule. It meant he would bring no major bill to the House floor unless most Republicans supported it.

It didn't matter if every House Democrat backed the bill, which would allow it to pass with a minority of Republicans. In essence, Democrats' votes were irrelevant to Hastert. Boehner is taking a similar approach, at least publicly.

"Not very interested," Boehner told reporters last week when asked about forming a coalition with Democrats to pass the legislation to keep the government operating.

Lawmakers and the White House are negotiating, but all sides agree the measure should cut more than $32 billion from current-year spending. Many Republicans want deeper cuts.

Boehner has told colleagues he wants at least 218 House Republicans to vote for the spending package. That's the magic number for passing bills in the 435-member House.

Members of both parties say Boehner probably could assemble 218 votes easily, if he didn't care who cast them. As an example, they point to the last short-term spending bill, which passed 271-158 in mid-March. It contained $10 billion in cuts, which Democrats once called unacceptable, and kept the government running for a few more weeks.

Of the 271 "yes" votes, 186 came from Republicans and 85 from Democrats. Voting "no" were 54 Republicans. That's more than one-fifth of Boehner's 241-member caucus.

Lawmakers say Boehner probably could muster a similar coalition this time. But the still-unfinished six-month bill is much more contentious, publicized and significant. People close to Boehner say he wants a significantly smaller GOP defection rate.

It's unlikely that Boehner will persuade 218 Republicans to join him, some Capitol insiders say, but another 54 or so defectors would hurt.

"The loss of a couple of dozen Republicans, who simply must pledge their fidelity to the tea party, are the kinds of casualties to be expected," said Rutgers University congressional scholar Ross K. Baker.

Such a defection rate would put Boehner right at the 218 threshold. Some lawmakers think his losses will be greater. Recent interviews with a sampling of House Republicans underscore his challenge.

Rep. Tim Scott, R-S.C., elected last fall with tea party support, said he won't support a bill unless the spending cuts "are well north of $33 billion."

That's the amount that Obama and Senate Democrats say they can accept. Many House Republicans insist on $61 billion in cuts. That amount would fulfill, on a pro-rated basis, their campaign promise of $100 billion in spending reductions for the 2011 budget year, which began Oct. 1 and goes through this September.

Rep. Paul Broun, R-Ga., said any bill with less than $61 billion in cuts would be an insult, and he pledged to vote against it.

Scott and Broun voted for the March 15 temporary extension, so they were not among the 54 Republicans whom Boehner lost. If they move into the "no" column on the forthcoming six-month bill, he would be losing ground, not gaining.

Meanwhile, Boehner faces plenty of problems from that group of 54.

In light of a government report suggesting duplications in federal programs cost up to $200 billion, even $61 billion in new cuts seems piddling, said Rep. Allen West, R-Fla., another tea party favorite. "What does that say to the American people?" he asked.

Other House Republicans insist on policy add-ons that would curb environmental regulations, abortion access and money for Obama's health care overhaul. Democrats strenuously oppose them.

Rep. Steve King, R-Iowa, said his non-negotiable stand on the spending bill is "no funding to Obamacare."

Boehner's allies warn against selling him short.

The speaker "is doing a great job managing an almost impossible process," said Terry Holt, a Republican consultant and former Boehner aide. The key for Boehner's team, he said, is to remind wavering GOP lawmakers that Democrats already have capitulated to unprecedented spending cuts, setting the stage for deeper reductions ahead.

Democrats are watching Boehner with bemusement and apprehension.

"He's obviously doing a dance" with the factions of his caucus, said Rep. Chris Van Hollen, D-Md.

"The tea party wing of his party refuses to give any ground," Van Hollen said. It demands "a right-wing social agenda under the guise of the budget. That will be unacceptable to the American people."