The District of Columbia Council approved legislation on Jan. 8 that would require pharmaceutical sales representatives to obtain licenses to operate within city limits, The Washington Post reports.

The measure is a first for any jurisdiction in the country. The narrow 7-to-6 vote marked both a loss and a victory for the pharmaceutical industry and the data-collection firms that lobbied the council to reverse its initial affirmative vote last month.

The council was able to strip the bill of earlier language offered by Independent Council member David A. Catania that would have banned the use of doctors’ prescription data for marketing purposes without their consent.

Similar laws have passed in New Hampshire, Vermont and Maine.Data collection firms have sued and U.S. District judges in New Hampshire and Maine have overturned the laws, citing the restriction of commercial free speech.

Catania said in The Post report he pulled the proposal to ban data mining “out of an abundance of caution.” He said he may propose a separate measure later this year after seeing whether the judges’ rulings are overturned on appeals.

Democratic Council member Harry Thomas Jr., who has been one of the most vocal opponents of the legislation, said he was glad that Catania had finally “seen the light.” Thomas had argued that a ban on data-mining could lead to a costly, no-win lawsuit for the city.

Democrats Yvette Alexander, Marion Barry, Muriel Bowser, Jim Graham and Republican Carol Schwartz voted against the measure despite the amendment.

Under the bill, the city would establish a pharmacy board that would license pharmaceutical salespeople who would also have to sign a code of ethics. They would be prohibited from using titles that would give the impression that they are licensed to practice medicine, pharmacy or nursing and would have to be college graduates to qualify for a license, The Post reported.