WASHINGTON — Maine lawmakers are trying to restore as much as $6 million in annual federal funding for the Downeaster eliminated by transportation bills pending in the House and Senate.

The legislation doesn’t allow Maine to keep using money from the federal Congestion Mitigation and Air Quality program to help operate the passenger rail service from Portland to Boston.

But Sen. Olympia Snowe, R-Maine, is working on adding back Maine’s ability to use the money as part of the Senate bill, which likely won’t be voted on until after a congressional recess next week. Her effort is backed by Sens. Susan Collins, R-Maine, Sheldon Whitehouse, D-R.I., and several other senators.

And in the House, Reps. Chellie Pingree, D-1st District, and Mike Michaud, D-2nd District, are hoping to get a vote as soon as this week on an amendment renewing the Downeaster funding source as part of the House version.

The House and Senate transportation bills are very different, and it isn’t clear whether House GOP leaders will even be able to pass their bill, which includes cuts in the general road repair money granted to most states, including Maine.

Votes on the five-year, $260 billion House bill and on the two-year, $109 billion Senate bill likely won’t come until after next week’s congressional recess. The Senate bill is considered the more likely to win bipartisan support.

The up to $6 million the Downeaster gets from the air quality program is a crucial part of the rail service’s annual operating budget of about $15.1 million, with $12 million of that paid to Amtrak to operate the line. The Northern New England Passenger Rail Authority, which manages the Downeaster on behalf of Maine, brings in about $8 million in revenue from sources such as ticket sales and food concessions, leaving about a $7.1 million shortfall.

The federal air quality money is used to make up 80 percent of that shortfall, which depending on the year can range from $5 million to $6 million. The rest of the shortfall is filled with money from a state-imposed car rental sales tax.

When the Downeaster service was launched in 2001, it was allowed to use the air quality program money on a temporary basis, under the theory that it was taking cars off the road and improving air quality. But Maine won an exemption in five-year transportation bill passed in 2005 that allowed it to keep using the air quality money for the life of the transportation bill.

Congress has failed to pass a new transportation bill, so Maine’s exception has been renewed each time the current bill’s policies are extended in lieu of a new bill being passed.

Pingree noted that noted that Congress recently approved spending $38 million to extend Downeaster service to Brunswick and Freeport and millions of dollars more to improve rail lines in Massachusetts.The line currently carries about a half-million passengers a year.

“The Downeaster is one of the most successful and popular rail lines in the country,” Pingree said in a statement today. “It has created economic development along its current route and we can already see the boost it’s giving to local businesses in Freeport and Brunswick where service will begin later this year. Now is not the time to pull the rug out from under the Downeaster by taking away this funding.”

Patricia Quinn, the executive director of the Northern New England Passenger Rail Authority, said that losing the ability to use the federal air quality money for the Downeaster would mean the state would have to find the funding elsewhere – not an easy task given the current state budget crunch.

“It could shift more of the financial burden to the state of Maine,” Quinn said. “It would definitely change the mix and create more challenges.”

But Snowe, Pingree and Michaud all say they are optimistic about the prospects of restoring the exception. Currently, only Maine and Oregon have such exceptions allowing states to use the federal air quality money for rail service subsidies, but other states too are trying to win more flexibility for how the money can be used, Quinn said.

Under the $260 billion pending House transportation bill, Maine would get about $878 million over five years, compared with about $958 million that flowed to the state over five years from the current transportation bill, Michaud said last week. The House bill cuts funding to most states, and it isn’t clear it has enough support to pass.

Michaud, a member of the House Transportation Committee, opposed the bill in committee. He noted that it also eliminates the scenic byways program, which over five years under the last transportation bill yielded $5.7 million for Maine beautification projects, helping tourism efforts.

But under the two-year Senate bill, Maine would get nearly $195 million this year and about $198 million in 2013, a hike over its 2011 allocation of $191.6 million, according to the office of Snowe, a member of two committees that helped craft the Senate bill — the finance committee and the commerce, science and transportation committee.

Just last year, Congress came close to banning Amtrak from using federal dollars for state-supported inter-city rail lines such as the Downeaster, which stops at a total of 10 stations in Maine, New Hampshire and Massachusetts. The rail line is set to expand to stations in Brunswick and Freeport. But a Senate version of a 2012 spending bill nixed a proposal by the House for the prohibition.