WASHINGTON — Washington D.C. will now accept medical marijuana cards from any state in the U.S.

Mayor Muriel Bowser announced the change in a press release Thursday afternoon.

"Non-residents needing their medication while they are visiting the District will be able to patronize the District’s regulated marijuana dispensaries and obtain their medication," according to a release from the city.

Officials noted it is still illegal to cross state lines with marijuana, and it is still federally prohibited.

RELATED: You could soon be able to legally buy weed in DC

“This emergency rulemaking is patient-centric,” Bowser said in a release. “It ensures medical marijuana patients from other states can obtain their needed medicine. It will also promote public safety by allowing visitors to obtain their medicine at one of the District’s six – soon to be seven – authorized dispensaries rather than forcing them to go without or patronizing the illegal market.”

Previously, the District recognized 19 other states' medical cards. Now, at least 27 states' cards will be recognized by the District's dispensaries.

Currently, DC residents cannot buy or sell marijuana and it can only be used on private property. Possessing two ounces or less or marijuana - if you're at least 21 - became legal in February of 2015.

RELATED: Can you smoke weed here? A look at the DC, Maryland and Virginia laws

In May, Bowser proposed legislation that would allow the sale of recreational weed in D.C.

The Safe Cannabis Sales Act outlines regulations for the sale and purchase of recreational marijuana.

It states that businesses that want to sell recreational weed need to meet a threshold of 60% ownership by D.C. residents, and 60% of employees need to be from D.C.

The act outlines a 17% tax on pot and pot products, which Bowser said will feed into funding public housing.

“We can reinvest in our communities that have been hardest hit by the criminalization of marijuana," Bowser said when the legislation was introduced.

That bill is under DC Council review.

Download the brand new WUSA9 app here.

Sign up for the Get Up DC newsletter: Your forecast. Your commute. Your news.