PORTLAND — Portland’s City Council has unanimously rejected a proposed moratorium on medical marijuana dispensaries in the city.

The city’s attorney recommended the temporary ban to give officials time to write new zoning and operating rules. The proposal also would have temporarily banned small-scale cultivation and use of medical marijuana that has been legal in Maine since 1999.

The council’s quick 9-0 decision tonight to reject the ban followed a public hearing in which advocates and patients said the proposal would keep needed medication away from suffering and severely ill people.

City councilors are now discussing where in the downtown business area to allow dispensaries. They are expected to send a zoning recommendation to the Planning Board.

Those wanting to set up one the state’s first eight dispensaries have until Friday to apply for a state license. The Maine Department of Health and Human Services plans to announce the first round of licenses by July 9.

The dispensaries will be spread around the state in eight regions, including one each in Cumberland and York counties. Portland is widely expected to be the home of the state’s busiest dispensary.

Dozens of Maine cities and towns adopted temporary moratoriums months ago while setting up zoning and operating guidelines, including Westbrook, South Portland and Biddeford.