Updated

Ten-year-old Gabriella Miller lost her fight with brain cancer last year. But she may have won another battle.

Inspired by Miller's story, a Republican-backed bill that would redirect millions in taxpayer funds from political conventions to pediatric medical research won final approval in Congress on Tuesday.

The Senate approved the House-passed bill on a unanimous voice vote at the request of Minority Leader Mitch McConnell, R-Ky. It now goes to President Obama for his signature.

The vote was hailed as a rare moment of bipartisanship in the increasingly divided Congress.

"So often everyone is focused on what Congress cannot accomplish that we overlook the good that can be done when both parties work together," House GOP Leader Eric Cantor, R-Va., who helped spearhead the bill, said in a statement. "One courageous young girl, Gabriella Miller, inspired bipartisan action to help research, treat, and cure pediatric diseases and disorders."

House Speaker John Boehner said: "Any time common sense can cut through the noise in Washington, it is a good day for America."

Miller had helped raise money for the Make-A-Wish Foundation but also had appealed to lawmakers to devote more funding to children's medical research.

She made a moving public plea for more funding shortly before her death.

"If I go, I lose my battle, then I want other people to carry on with this war," she told the advocacy group Truth 365 about two weeks before she died.

The legislation redirects $126 million over the next decade from political party conventions to pediatric research initiatives, including cancer research, through a fund administered by the National Institutes of Health.

The legislation also requires political parties to transfer leftover convention money to a 10-Year Pediatric Initiative Fund. Though conventions are funded in part by private contributions, each major party receives millions every year in taxpayer funds. Lawmakers say the money has been spent on everything from floral arrangements to gift bags.

Senate Majority Leader Harry Reid of Nevada said that the measure is largely symbolic and doesn't directly fund additional pediatric research; the actual funding would come in future appropriations bills. Funding for medical research through the National Institutes of Health has been squeezed in recent years under tight spending limits and automatic spending cuts known.

"It's extremely important that we understand that the NIH is billions of dollars short of being able to maintain the place they've had in the past," Reid said.

The Associated Press contributed to this report.