WASHINGTON — The Justice Department on Thursday said it would not sue to block laws legalizing marijuana in 20 states and the District of Columbia, a move that proponents hailed as an important step toward ending the prohibition of the drug.

In a memo to federal prosecutors nationwide on Thursday, James M. Cole, the deputy attorney general, erased some uncertainty about how the government would respond to state laws making it legal to use marijuana for medical or recreational purposes.

Citing “limited prosecutorial resources,” Mr. Cole explained the change in economic terms. But the memo also made clear that the Justice Department expects states to put in place regulations aimed at preventing marijuana sales to minors, illegal cartel and gang activity, interstate trafficking of marijuana, and violence and accidents involving the drug.

“A system adequate to that task must not only contain robust controls and procedures on paper; it must also be effective in practice,” he wrote.