This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

MOBILE, Ala. — Ridesharing services like Lyft and Uber are now legal across Alabama.

A new law approved by lawmakers took effect Sunday allowing the smartphone-based services statewide.

The companies were previously legal only in major cities.

Alabama is the 45th state to pass ridesharing legislation. Gov. Kay Ivey says legalizing the services will provide jobs and allow for new transportation alternatives.

The new law charges ridesharing companies a fee that’s paid to the Public Service Commission. The commission will regulate companies, issue permits and implement discrimination and substance abuse policies.

Getting a ride could still be difficult in rural parts of the state where cellular phone service is spotty.