The Biden administration released new guidelines on Friday that will no longer automatically disqualify political appointees because of previous recreational marijuana use.

After an “intensive consultation with security officials” and the Personnel Security Division, a Biden administration official told NBC News that the White House can now, on a case-by-case basis, waive a requirement that potential appointees in the Executive Office of the President be eligible for top secret clearance.

Editorial Cartoons on Marijuana

The official said a waiver would only be granted to people who have used marijuana recreationally on a “limited” basis and who are in positions that do not require security clearance.

While many states have legalized marijuana for medical and recreational use, it is still illegal under federal law, and transition officials discovered it could pose an obstacle for applicants, especially younger ones.

“President Biden is committed to bringing the best people into government – especially the young people whose commitment to public service can deepen in these positions and who can play leadership roles in our country for decades to come,” a White House official said in a statement to NBC. “The White House’s policy will maintain the absolute highest standards for service in government that the president expects from his administration, while acknowledging the reality that state and local marijuana laws have changed significantly across the country in recent years.”

White House officials stressed that the new policy only applies to marjiuana, and even so, some appointees may still not be granted a waiver based on the extent of their use.

Anyone who is granted the waiver must agree to stop all use of marijuana for the entirety of their service in government and agree to random drug testing. Officials said those granted the waiver would also be required to work remotely for a certain amount of time following their last disclosed use of the drug.

The new policy, according to officials, will “effectively protect our national security while modernizing policies to ensure that talented and otherwise well-qualified applicants with limited marijuana use will not be barred from serving the American people.”