Boulder District Attorney Stan Garnett has sent a letter to the top federal prosecutor in Colorado, asking federal authorities to drop their crackdown on medical-marijuana dispensaries that are abiding by state law.

In the letter, dated Tuesday, Garnett writes that Colorado has created a system for regulating medical-marijuana businesses that is working and that it is not worth the federal government’s time to target dispensaries abiding by state law.

“I can see no legitimate basis in this judicial district to focus the resources of the United States government on the medical marijuana dispensaries that are otherwise compliant with Colorado law or local regulation,” Garnett wrote in the letter to Colorado U.S. Attorney John Walsh. “The people of Boulder County do not need Washington, D.C., or the federal government dictating how far dispensaries should be from schools, or other fine points of local land-use law.”

Garnett’s letter comes following the most direct crackdown yet in Colorado on dispensaries by federal law enforcement officials. Earlier this year, Walsh sent letters to 23 medical-marijuana dispensaries that were within 1,000 feet of a school, ordering them to close or face civil or criminal punishment. All those ordered to do so shut their doors.

Colorado law establishes a 1,000-foot buffer between dispensaries and schools but also allows communities to vary the distance or grandfather in pre-existing businesses. All the dispensaries that received letters were apparently complying with state and local laws.

Federal law makes all marijuana possession and sales illegal. Drug sales within 1,000 feet of a school bring enhanced penalties. Walsh said he sent the letters because he’s concerned that the presence of medical-marijuana businesses near schools may be encouraging the increase that the state is seeing in youths using marijuana.

Jeff Dorschner, a spokesman for Walsh, said Walsh had received the letter.

“Our office has always had a good working relationship with” Garnett, Dorschner said. “We are in the process of reviewing his letter.”

Dorschner reiterated Walsh’s pledge to send letters to more dispensaries near schools, saying those letters will be sent soon.

John Ingold: 303-954-1068 or jingold@denverpost.com