WASHINGTON (Reuters) - A stop-gap funding bill to avoid a federal government shutdown later this week failed to garner enough votes to move forward in the Senate on Tuesday, with Democrats and Republicans both opposing the measure.

Senator Ted Cruz (R-TX) (C) speaks with reporters regarding a stop-gap funding bill to avoid a federal government shutdown later this week on Capitol Hill in Washington, U.S., September 27, 2016. REUTERS/Gary Cameron

The must-pass continuing resolution, or CR, which would keep federal agencies operating from Saturday through Dec. 9, received only 45 of the 60 votes needed to limit debate and be considered for passage by the 100-seat Republican-controlled Senate.

Forty Democrats and two independents opposed the CR because it lacked a $220 million aid package to address the drinking-water crisis in Flint, Michigan. It also drew opposition from 13 Republicans, including Senator Ted Cruz, the former presidential candidate.

Senate leaders said they would explore alternatives to avoid a shutdown.

Without an extension, many federal agencies will run out of operating funds when the government fiscal year expires at midnight on Friday.

The bill includes $1.1 billion to combat the Zika virus and $500 million for flood relief in Louisiana and other states.

“This is a 10-week funding bill. Its contents command broad support. It contains zero controversial riders,” Senate Majority Leader Mitch McConnell said before the vote.

Democrats in the Senate and House of Representatives vowed to oppose the resolution until Republicans agree to a Flint aid package that the Senate passed by a 95-3 margin this month as part of a separate water resources bill.

Flint, a city with over 100,000 people, has had lead-tainted drinking water for more than two years.

Democrats, who say it is unfair to aid flood-ravaged areas and not Flint, want Republicans to include Flint aid in the CR or a version of the water resources bill that the House will vote on this week. Republicans say they will consider Flint later. Both sides say the aid package is paid for.

“There is no excuse - none - for not including this provision,” said Senator Debbie Stabenow, a Michigan Democrat.

McConnell told reporters he would consider the possibility of removing the flood-relief provision from the CR to win support from Democrats.

“Let’s see him do it,” Senate Democratic leader Harry Reid said when asked about McConnell’s remarks.

Reasons for Republican opposition ranged from disapproval of Zika funding in the measure to frustration over the absence of provisions to boost the U.S. Export-Import Bank and block international oversight of the internet.