WASHINGTON  — Patients treated at Veterans Affairs hospitals and clinics will be able to use medical marijuana in the 14 states, including Maine, where it’s legal, according to new federal guidelines.

The directive from the Veterans Affairs Department in the coming week is intended to clarify current policy that says veterans can be denied pain medication if they use illegal drugs. Veterans groups have complained for years that this could bar veterans from VA benefits if they were caught using medical marijuana.

The new guidance does not authorize VA doctors to begin prescribing medical marijuana, which is considered an illegal drug under federal law. But it will now make clear that in the 14 states where state and federal law are in conflict, VA clinics generally will allow the use of medical marijuana for veterans already taking it under other clinicians.

“For years, there have been veterans coming back from the Iraq war who needed medical marijuana and had to decide whether they were willing to cut down on their VA medications,” John Targowski, a legal adviser to the group Veterans for Medical Marijuana Access, which worked with the VA on the issue.

Targowski in an interview Saturday that confusion over the government’s policy might have led some veterans to distrust their doctors or avoid the VA system.

Dr. Robert A. Petzel, the VA’s undersecretary for health, sent a letter to Veterans for Medical Marijuana Access this month that spells out the department’s policy. The guidelines will be distributed to the VA’s 900 care facilities around the country in the next week.

According to the National Conference of State Legislatures, the 14 states with medical marijuana laws are  Alaska, California, Colorado, Hawaii, Maine, Maryland, Michigan, Montana, Nevada, New Mexico, Oregon, Rhode Island, Vermont, Washington and and the District of Columbia. New Jersey also recently passed a medical marijuana law, which is scheduled to be implemented next January.