The House began voting at 12:20 a.m., as members scrambled to return to Washington during what was a planned two-week Easter recess. The bill was approved on a 203-58 vote.
President Bush, who had rushed back from his Texas ranch yesterday, signed the legislation less than an hour after the vote, the White House said.
House leaders had been forced to delay a vote until early this morning after Democrats objected to passing what they called a constitutionally questionable bill without any debate, in a case that has focused new attention on the issues of medical treatment, its withdrawal, and the role of lawmakers and courts in family matters.
Parties were left trying to round up enough members for a quorum, after sending them home last week for what was supposed to be a two-week vacation.
"We are very, very, very thankful to cross this bridge. And we are very hopeful that the federal courts will follow the will of Congress and save my sister's life," said Suzanne Vitadamo, Terri Schiavo's sister.
A lawyer for Terri Schiavo's husband, Michael, said the measure could be found unconstitutional.
But an attorney for Terri Schiavo's parents filed a request for an emergency injunction with a federal appellate court to have her feeding tube reinserted once the bill is passed. He also planned to make a similar request with the federal district court in Tampa, Fla.
"We are considering every second as precious in terms of saving Terri," said David Gibbs II, an attorney for her parents, Bob and Mary Schindler.
The president's brother, Gov. Jeb Bush, praised the actions of Congress. "We in government have a duty to protect the weak, disabled and vulnerable," he said in a statement yesterday. "I appreciate the efforts of state and federal lawmakers on both sides of the aisle who have taken this duty to heart."
Opponents of the fast-tracked bill said congressional interference would only compound a long-running family tragedy.
"We are members of Congress. We're not doctors. We're not medical experts. We're not bioethicists," Rep. Debbie Wasserman Schultz, a Florida Democrat, said during three hours of debate on the House floor late last night.
"We don't know. We're not God. And we're not Terri Schiavo's husband, sister, brother, uncle or cousin," she said. "We're members of Congress. We make laws, and we uphold the law, and we swore to protect the Constitution. And we are thumbing our nose at the Constitution if this goes forward."
Schiavo's feeding tube was disconnected Friday, three weeks after a Florida state judge allowed its removal as the end to a nearly seven-year fight between her parents and her husband. After failing to come to a deal late last week, congressional leaders worked through the weekend to broker a compromise and pass a bill that could result in the feeding tube being reinserted.
Schiavo, 41, was expected to die within two weeks unless her tube is reinserted, as has happened twice before.
House Majority Leader Tom DeLay said Democrats had cost Schiavo two more meals with their tactics.
By throwing the case to a federal court in Florida, supporters of the measure hope that a judge will order the feeding tube reinserted while the case is reconsidered.
Fifteen years after Schiavo's brain was severely damaged - and years after her husband began fighting for the right to disconnect the feeding tube that sustains her - her case suddenly consumed Congress.
Despite seeing only videotapes of Terri Schiavo, lawmakers such as DeLay have opined that she is not in a "persistent vegetative state," as the courts have consistently found. They say she can talk, that her condition could improve if she had physical therapy, and that her husband has shirked his duty as her guardian by trying to end her life - something, Michael Schiavo maintains, that his wife would have wanted.
"We in the Senate recognize that it is extraordinary that we act," Senate Majority Leader Bill Frist said. "But these are extraordinary circumstances that center on the most fundamental of human values - the sanctity of human life."
But opponents of the legislation said it goes against several principles normally espoused by Republicans, including state sovereignty, a limited federal government and the sanctity of marriage.
"I think we are seeing, sadly, the manifestation of a constitutional crisis," said Rep. Barney Frank, a Massachusetts Democrat. "We have people in power today in both houses and in the White House who simply reject what has always been the fundamental precept of American government; namely that it's a limited government. And there have been times when I've chafed at those limits.
"But we now have people who don't just chafe at the limits, they totally disregard them."
Rep. Robert Wexler, a Florida Democrat who opposes the bill, said, "It is not the place of Congress - at the 11th hour and in the most abusive fashion - to undermine the Florida court system."
But supporters said that because the bill is essentially a personal piece of legislation for Terri Schiavo and deals only with jurisdiction, not the outcome, it should pass constitutional muster.
The House convened briefly yesterday at 1 p.m. yesterday, with only a handful of lawmakers present. Republican leaders had hoped to push the bill through quickly, but several Democrats made it clear they would not allow the bill to sail through.
When the Senate passed the bill late in the afternoon, only three senators - Frist, Mel Martinez of Florida and Virginia's John W. Warner - were in the chamber, all of them Republicans.
Terri Schiavo's brother, Bobby Schindler, continued his campaign to lobby lawmakers to help his sister. He arrived in Washington on Tuesday, and spoke yesterday with opponents of the bill - including Democratic Reps. James P. Moran Jr. of Virginia and Jim Davis of Florida.
Proponents of the bill said the sudden interest of Congress has nothing to do with politics, or efforts by Republicans to appeal to Christian conservatives, for whom right-to-life issues are paramount.
"This is not a political issue - this is life and death," DeLay said.
But Davis, whose Tampa-area district is in the same part of the state as the Pinellas Park hospice where Terri Schiavo lives, said Congress is clearly overstepping its authority.
"The United States Congress is on the verge of telling states and courts that their decisions and rules do not matter," he said.
Rep. Dave Weldon, a Florida Republican, a doctor, and one of the early sponsors of the Terri Schiavo legislation, mused yesterday about the competing opinions and ideas caught up in the debate. He conceded that it was unusual for lawmakers to diagnose by videotape but said he was convinced that Congress was doing the right thing.
Wire services contributed to this article.