If you're a resident of Maryland, you no longer have to fear a potential employer asking you to hand over the keys to your Facebook or Twitter profiles before giving you a job.

Both Houses of the Maryland General Assembly voted on a bipartisan basis to pass a bill blocking the practice on Monday afternoon.

Employers will still be able to view public posts online, but can't demand access to private material as a condition of employment.

The decision was met with enthusiasm from the American Civil Liberties Union, which championed the cause after a Maryland corrections officer was asked for his Facebook password during a recertification interview.

"We are proud of Maryland for standing up for the online privacy of employees and the friends and family members they stay in touch with online," said Melissa Goemann, legislative director of ACLU of Maryland. "Our state has trail-blazed a new frontier in protecting freedom of expression in the digital age, and has created a model for other states to follow."

Division of Corrections Officer Robert Collins took a leave of absence from his job after his mother died. Upon returning to work, he found his job filled, and thus had to interview for a comprable position. During that process, Collins was asked for his social media passwords.

Despite his unease, he agreed. Soon afterward, he turned to the ACLU for help, which brought national attention to Collins' case. Now, he's glad to see the privacy-protecting bill has passed.

"I am excited to know that our esteemed policymakers in Maryland found it important to protect the privacy of Maryland's citizens," said Collins. "I believe privacy should not be an alternative in lieu of securing employment, but a fundamental right."

SEE ALSO: What to Do When A Potential Employer Asks for Your Facebook Password

The phenomenon has been making headlines since early last month when the ACLU filed its original complaint against the Maryland Department of Corrections. Facebook itself came out against the practice, while similar bills are expected to be introduced in the California state legislature and in the U.S. Senate.

The Maryland bill was backed by Maryland State Senator Ron Young along with Delegates Mary Washington and Shawn Tarrant.

Image courtesy of iStockphoto, SchulteProductions