Federal regulators will allow banks to provide financial services to marijuana-related businesses operating legally under state laws as long as lenders make regular reports to the Treasury Department and watch for suspicious activity.

The guidance issued Friday by the Treasury and Justice Department is meant to help address concerns among banks about contradictory state and federal laws regarding marijuana. The drug is illegal under federal law, but 20 states and the District of Columbia have legalized it for certain uses,...