Maryland Gov. Martin O'Malley will sign legislation decriminalizing marijuana in his state, the governor's office announced Monday.

The legislation will make Maryland the 17th state to decriminalize marijuana.

O'Malley, often touted as a potential contender for the Democratic presidential nomination in 2016, explained his stance in a statement.

"As a young prosecutor, I once thought that decriminalizing the possession of marijuana might undermine the Public Will necessary to combat drug violence and improve public safety," he said. "I now think that decriminalizing possession of marijuana is an acknowledgement of the low priority that our courts, our prosecutors, our police, and the vast majority of citizens already attach to this transgression of public order and public health."