Stewart and others rose to a standing ovation as the vote passed the threshold needed and several senators, including New York Democrat Sen. Kristen Gillibrand, who had helped lead the effort, joined the applause from the Senate floor.
The House passed the measure 402-12 earlier this month. It now heads to President Donald Trump's desk. Because more than two-thirds of the Senate and House supported the bill, Congress could override a veto if Trump objected, but he is expected to sign it.
At a news conference afterward, Gillibrand said, "Today is not a celebration. It’s a deep sigh of relief." Senate Minority Leader Chuck Schumer, a New York Democrat, said, "Righteousness sometimes -- sometimes -- in this mangled town sometimes prevails."
After Gillibrand introduced him as a "hero," Stewart said, "Yes, I think we can all agree I’m the real hero. Hard not to see it that way," he said as laughter broke out.
"This has been the honor of my life ... We can never repay all that the 9/11 community has done for our country.Today, they can exhale....There've been too many funerals. Too many hospices. These families deserve better," he said.
The fund was created to provide compensation to anyone who suffered physical harm or was killed as a result of the terrorist-related aircraft crashes or the debris removal efforts that took place in the immediate aftermath of those crashes. Before Tuesday's vote, the fund was set to run out of money in December 2020.
Stewart has been a major proponent of making the fund permanent and before Tuesday's vote he posed for a photo as he tried to keep up the pressure on Senate Majority Leader Mitch McConnell
His celebrity shone a spotlight on the issue, and his testimony on Capitol Hill ripped lawmakers for failing to fully fund the program.
"They responded in five seconds," Stewart shouted at a hearing on June 11. "They did their jobs. With courage grace, tenacity, humility. Eighteen years later, do yours!"
Even as Stewart worked toward an expeditious solution, some 9/11 victims were not able to see the fruits of his labor. NYPD Detective Luis Alvarez passed away from cancer just weeks before the bill was passed.
Alvarez had given his badge to McConnell, a sign of the promise McConnell made to the ailing detective to bring the legislation to the Senate floor for a vote without any political jockeying over the budget.
Last week, GOP Sen. Rand Paul of Kentucky opposed passing the bill by unanimous consent, with concerns about how to pay for the fund. Republican Sen. Mike Lee of Utah also introduced an amendment to increase oversight on the fund. Both amendments failed to pass in a Senate vote on Tuesday. Both Paul and Lee voted against the final bill.
Jon Feal, a 9/11 recovery worker and longtime advocate, said after the vote, "Passing this legislation—there's no joy. There's no comfort. Yes, I cried with Jon. But that was to exhale. That was to get 18 years of pain and suffering out."
And he thanked McConnell for keeping his word.
"I thank Congress for recognizing the bravery and sacrifices of the 200 FDNY members who have lost their lives since September 11th, and the thousands more who are battling illnesses still today," New York City Fire Department Commissioner Daniel Nigro said in a statement. "By reauthorizing the 9/11 Victim’s Compensation Fund, they have made a lifelong commitment that these men and women have earned, and truly deserve."
ABC News’ Christine Szabo contributed to this story.