When Maryland’s Department of Public Safety and Correctional Services asked Robert Collins for the password to his social media accounts, he balked and filed a claim with the American Civil Liberties Union. About a week later, the department suspended the policy, and on Monday, both houses of the Maryland General Assembly passed a bill banning the practice altogether.

According to the law, employers cannot ask job applicants or employees for their social media passwords. The law also prohibits employers from taking or threatening to take disciplinary action for not complying with such requests.

“I believe privacy should not be an alternative in lieu of securing employment, but a fundamental right,” Collins said. “[I] hope that other state legislatures, and more importantly the federal government, follow Maryland's lead and ensure these essential protections for all Americans nationwide.”

The bill was sponsored by Sen. Ron Young, a Democrat of Frederick County, and Dels. Shawn Tarrant and Mary Washington, both Democrats from Baltimore County. The bill awaits the signature of Gov. Martin O’Malley (D).

Other states such as California and Michigan are seeking similar laws. Sens. Chuck Schumer (D-N.Y.) and Richard Blumenthal (D-Conn.) asked the Justice Department last month to look into the practice to see if it violates federal law.

Related stories:

Michelle Singletary: Would you give potential employers your Facebook password?

On Small Business Commentary: Demanding Facebook passwords hurts job candidates and employers

Senators call for investigation into Facebook password trend