Updated June 29, 2011 -- 2:57 p.m.

Congress has finally passed a bill authorizing federal spending on highways and transit for the next two years, just a day before the current legislation was set to expire.

It's legislation that's more than two-and-a-half years in the making. SAFETEA-LU -- the previous version of the legislation -- expired in September 2009, and Congress has passed nine temporary extensions since then to keep the country's transportation programs afloat.

On Friday afternoon, the U.S. House of Representatives passed the transportation authorization bill on a 373-52 vote. Shortly afterwards, the U.S. Senate passed the legislation 74-19. The bills were part of a package included with legislation that prevented student loan rate increases.

The sentiment among most stakeholders is that while the legislation wasn't particularly ambitious -- it fails to substantively increase funding for transportation, and it relies on what many call accounting gimmicks to provide the funding that's there -- it's better than allowing the legislation to expire.

As recently as last week, some legislators, stakeholders and advocates believed the legislation was at risk of dying, as it appeared negotiators on a conference committee might not reach agreement.

"People did not think this was possible," Sen. Mary Landrieu (D-La.) said on the floor of the Senate after the legislation passed.

The previous longstanding uncertainty about transportation legislation had caused endless frustration for state and local leaders, who said the nine stopgap extensions made it difficult to conduct long-range planning for big infrastructure projects, since they didn't know how much federal funding to expect in the future. Relief is now in sight.

Highlights of the legislation include provisions to streamline the federal approval process of transportation infrastructure projects and consolidate the number of highway programs by two-thirds in a move that's being praised as a way to reduce red tape and promote efficiency.

The legislation also gives "categorical exclusions" to some types of projects that exempt them from the full force of federal environmental regulations. That includes repairs to infrastructure damaged in emergencies, work being done in some existing rights-of-way, and projects that get a low percentage of federal funding. Environmentalists don't like those reforms, but state highway programs will likely enjoy less red tape and delays as they pursue projects.

The bill does not include approval of the controversial Keystone XL pipeline, which House Republicans had hoped to include.

“This agreement will help strengthen our nation’s construction industry and provide stability to highway, bridge and infrastructure projects across the country," said Rep. John Mica (R-Fla.), who chairs the U.S. House Committee on Transportation and Infrastructure, in a statement earlier this week when it became clear the legislation was poised to pass.

Sen. Barbara Boxer (D-Calif.), who chairs the U.S. Senate Environment and Public Works Committee, said the agreement "provides stability and flexibility for the nation's transportation planners, invests in America's crumbling roads and bridges, and puts people back to work."

The legislation doesn't increase federal gas taxes, and legislators never seriously considered doing so, even though it's a step most experts believe is necessary to protect the long-term solvency of the Highway Trust Fund, which helps fund the federal government's transportation spending.

After the Senate passed the bill, Boxer said that legislators will address that problem as they craft the next highway bill. "We know gas tax receipts are going down and we have to look at the problem," Boxer said on the Senate floor.

Federal lawmakers are emphasizing the legislation's role as a sort of jobs bill. If the existing legislation has been allowed to expire at the end of the day Saturday, it would have caused a slowdown or complete halt of many state and local transportation construction projects. So far, the legislation is generally being praised by the business community -- it means more work for construction and engineering firms -- as well as state transportation officials.

About two months ago, 47 legislators began bipartisan meetings as part of a conference committee tasked with hammering out the differences between the Senate and House transportation bills. In March, the Senate passed a two-year, bipartisan transportation bill known as MAP-21. Disagreements among House Republicans prevented them from passing their own long-term highway bill, so instead they passed a short-term extension that was used as a vehicle to begin negotiations with the Senate.

The text of the bill approved Friday (available here) was the result of those negotiations. It's a 27-month bill that provides level funding, plus a slight increase for inflation. Transportation advocates largely bemoan the current condition of the country's infrastructure, and the level funding isn't likely to help that situation. But it does avoid draconian cuts that earlier versions of a House transportation bill had called for, and it ensures stability in the program for two years.

Transportation stakeholders are viewing the deal as the best they could get in a Congress that has stark partisan differences, which has prevented passage of legislation for so long.

"I think it's as good as we could have hoped for," says Janet Kavinoky, who leads the transportation program at the U.S. Chamber of Commerce, in an interview with Governing. "There will always be people who's attitude is, 'It should have been bigger; it should have been more transformation; it should have been longer.' But two weeks ago, I didn't think we would have had a bill at all."

Each of the last two highway and transit bills had six-year timelines. Interestingly, the two-and-a-half-year gap between the expiration of SAFETEA-LU and passage of new legislation this week exceeds the duration of the new bill. That means, in the not-too-distant future, lawmakers, stakeholders and advocates will again have to consider another transportation bill. "What we're going to do is immediately go to work on the next bill," Art Guzzetti, vice president of policy at the American Public Transportation Administration, tells Governing.

Transportation advocates also scored a big victory with the expansion of the popular TIFIA program, which provides low-interest loans for transportation projects. One of its biggest cheerleaders has been Los Angeles Mayor Antonio Villaraigosa, who hopes to utilize the expansion of the federal program to help with his own local transit projects.

The program will be expanded from $122 million annually to $1 billion annually, and it can now help finance up to 49 percent of a projects' costs, up from 33 percent. States and localities had argued for those reforms to TIFIA, making the case that it was the best way for the federal government to leverage its resources, since it primarily helps with financing as opposed to funding like a grant program.

Because the legislation doesn't increase gas taxes, it calls for a $6.2 billion transfer of general U.S. Treasury funds to the Highway Trust Fund's account in FY 2013 -- essentially a bailout -- as well as another $10.4 billion infusion in FY 2014, coupled with a $2.2 billion transfer into the fund's transit account.

The bill doesn't raise taxes but instead takes steps that some have derided as accounting gimmicks to fill the funding gap. Those steps include increasing the size of insurance payments that pension plan sponsors must make to the Pension Benefit Guarantee Corporation, and appropriating money from a tax on motor fuels that is intended to help clean up environmental damage done by leaking underground storage tanks.

The legislation also fails to increase the tax benefits for workers who commute via transit, as some transit advocates had hoped. While transit riders can deduct $125 per month for the purposes of taxable income, those who park can deduct $240. Transit advocates saw that as an inequity that favored drivers over those who use buses and rail.

And advocates like America Bikes say that the bill will cut funding for pedestrian and biking projects by as much at 70 percent and combine them into a single program called Transportation Alternatives. "This is a step backwards," says David Goldberg, a spokesman for Transportation for America. "There's an eff-you on every page of this practically."

The legislation doesn't include any earmarks -- unlike it's predecessor, which has more than 6,300, according to Congressional leaders. Many speculate that the lack of those sweeteners is part of the reason legislators have lacked an incentive to pass the bill for so long.