Preventing pregnancy has never been cheaper for insured people in Maryland. On Tuesday, the state's governor signed the Contraceptive Equity Act into law, effectively ending out-of-pocket costs for all forms of contraception.

The law expands on the Affordable Care Act and goes into effect in 2018. It makes Maryland the first in the nation to mandate coverage for emergency contraceptives like Plan B.

Additionally, all types of birth control pills will be free, and trips to the pharmacy will be dramatically reduced as women can get up to six months of pills at a time. Women who prefer a long-acting contraceptive like an IUD no longer need preauthorization.

>> Read more trending stories

This law isn’t just for women -- insurance agencies regulated by the state will soon be forced to eliminate out-of-pocket costs for men who have vasectomies.

These changes could save people a lot of money. According to Planned Parenthood, vasectomies can cost up to $1,000, and common "morning-after" pills range from $25 to $65.

The bill's sponsor told the Baltimore Sun it was initially met with pushback from insurance agencies, but that the act will make a "huge difference in the people's lives."

While Maryland is unique in offering full coverage for emergency over-the-counter contraception and vasectomies, more than half of the states in the nation require insurance companies that cover prescription drugs to also cover any type of approved contraceptive.

Some states, like California and Oregon, have taken things a step further. Women in those states can get birth control pills without a prescription.

This video includes clips from Baylor Scott & White HealthWANE and Planned Parenthood and images from Getty Images and Sarah Mirk / CC BY 2.0.