The Senate has approved legislation extending a moratorium on state Internet access taxes for seven years.

With only days left before the Internet tax ban was set to expire, the Senate reached a compromise between lawmakers who proposed a shorter extension and those who insisted it should be made permanent.

By keeping the Internet tax-free and affordable, Congress can encourage Internet use for distance learning, telemedicine, commerce and other important services, Sen. Ted Stevens of Alaska said in a statement on Thursday night.

The vote came about two weeks after the House of Representatives approved a four-year extension of the Internet tax ban. The two chambers will now have to work out differences between the bills.

The state tax ban, in place since 1998, was last renewed by Congress in 2004 for three years. It is scheduled to expire on November 1.

Internet service providers say the price of Internet access could rise by as much as 17 percent if the moratorium on state taxes were allowed to expire.

Some senators, including many Republicans, had argued that a permanent ban on Internet taxes is needed to spur more investment by broadband service providers. They complained that Senate Democratic leaders had blocked a vote on a permanent moratorium.

(Reporting by Peter Kaplan)