Updated

The top Republican leaders in Congress dampened talk of a quick compromise on legislation to remake Medicare (search) on Friday as they confronted issues ranging from the details of a prescription drug benefit to proposed free market measures and a dispute over lower-cost generic drugs.

With talks expected to begin next month, Senate Majority Leader Bill Frist (search), R-Tenn., and Speaker Dennis Hastert, R-Ill., both said they want the final compromise to require affluent senior citizens to pay more for their Medicare.

"We have a mandate to do so," said Frist, referring to the Senate's strong signal of support Thursday night for a plan to charge higher-income seniors a larger premium for doctor and non-hospital services under existing Medicare.

The House legislation envisions higher prescription drug costs for some upper income seniors, and Hastert said it "should be in there, so someone who makes $60,000 is going to get a different benefit than someone who makes $100,000."

Both houses approved legislation early Friday in remarkable post-midnight sessions at opposite ends of the Capitol.

"We got it done. Sometimes it's pretty, sometimes it ain't" shrugged Hastert, who held open the final House roll call for nearly an hour, until nearly 2:45 a.m., so he could scrounge up enough votes to pass the GOP-backed measure.

In the end, Rep. C.L. Otter, R-Idaho, and Jo Ann Emerson, R-Mo., switched their votes from opposition to support, and the measure passed, 216-215. Emerson's decision sealed passage after Hastert and other Republicans had lobbied her intensely toward the rear of the chamber. When she stepped forward to cast her vote, Rep. Nita Lowey, D-N.Y., hugged her in a gesture of sisterly support.

Frist had endured his own moment of crisis a few hours earlier, when the Senate signaled support for the plan to charge upper-income seniors more for Medicare. That prompted Sen. Edward M. Kennedy (search), D-Mass., whose support for the measure has been pivotal, to threaten to filibuster and block passage.

"It's not going to happen tonight," he said as he walked away from a huddle of senators in the front of the chamber. In the end, the amendment was quietly killed, to the obvious disgust of some members of the Republican rank-and-file. "We just caved," one voice floated up from the GOP side of the Senate.

Not long afterward, the measure passed on a bipartisan vote of 76-21.

Hastert and Frist talked by telephone Friday to look ahead to the beginning of negotiations after Congress returns from next week's Independence Day vacation. Officials said it was possible the Senate majority leader would personally preside over the Senate bargaining team. That, in turn, could prompt Hastert to consider taking a similar role for himself, an unprecedented level of involvement.

An aide said Senate Democratic leader Tom Daschle (search) would take a formal role.

Both Hastert and Frist declined to set a timetable for agreement, though, raising the prospect of a negotiation that consumes weeks or months.

Also unclear was the fate of proposals to legalize the importation of brand-name drugs from Canada.

Both bills include provisions on the subject, but both also require that the Food and Drug Administration certify the safety of the drugs before they can be moved across the border. The FDA signaled recently it would not do so, citing fears of terrorism and other safety concerns.

Emerson said she won a commitment from Hastert that the final bill would remove the FDA's ability to block importation of Canadian drugs.

The speaker told reporters Emerson had been guaranteed a vote on the issue on another piece of legislation, although he also said the outcome of that vote would determine "the will of the House" when it came time to bargain with the Senate.

Hastert also said he intended to defend a provision backed by conservatives that would have premium costs set by competitive bidding beginning in 2010. Democrats sharply attacked the proposal as a step toward privatization of Medicare, and said it would lead to large increases in premiums for seniors remaining in traditional Medicare.

The federal agency that oversees the program released a report from its chief actuary saying the premium increases would vary from roughly 5 to 25 percent, depending on the cost of private insurance plans and the number of seniors enrolling in them.