Governor Deval Patrick today signed a bill into law that will allow domestic violence and sexual assault victims to vacate their lease or rental agreements without financial penalties.

The bill, “An Act Relative to Housing Rights for Victims of Domestic Violence, Rape, Sexual Assault, and Stalking,” also allows victims to cite their situation as a defense in eviction proceedings, the governor’s office said.

“We must do all we can to protect victims of sexual and domestic violence,” Patrick said in a statement. Patrick was joined when he signed the bill by Lieutenant Governor Timothy Murray and other supporters of the bill at a State House signing ceremony, the governor’s office said.