A federal judge in Washington dealt a blow on Thursday to the Consumer Financial Protection Bureau’s investigative authority, ruling that the agency strayed outside its jurisdiction when it demanded information last year from an accreditor of for-profit colleges.

Judge Richard Leon struck down the bureau’s petition to enforce a civil investigative demand that had been issued in August to the Accrediting Council for Independent Colleges and Schools, a nonprofit organization that accredited several Corinthian Colleges campuses.