The state attorney general, J. B. Van Hollen, said he would not defend a new law that grants same-sex couples spousal benefits like hospital visits and inheritance, saying lawmakers went against voters’ decision not to extend such privileges. Mr. Van Hollen, a Republican, said the state’s Constitution prohibited same-sex couples from holding a legal status that is “substantially similar” to marriage, and said he had concluded that the new domestic partner registry did that. His decision will force the state to hire an outside counsel to defend the law. Gov. James E. Doyle, a Democrat, said: “The attorney general’s job is to represent the state and defend state law when there is a good-faith defense to be made. His representation should not be based on whether he likes the state law.”