ATLANTA, Jan. 3  Tennessee has collected nearly $3.5 million since it began enforcing its tax on illegal drugs two years ago, officials from the Department of Revenue said Wednesday.

The state’s Unauthorized Substances Tax, passed by the Legislature in 2004, requires anyone in possession of an illegal drug to buy and affix stamps to the drugs’ packaging.

Under the law, information provided to the Department of Revenue to buy stamps cannot be used in criminal prosecutions. There is a toll-free number for stamp application requests, and stamps are doled out based on type of drug and weight.

As is the case in some two dozen other states with similar laws, however, the stamps have become curiosities bought by collectors and lobbyists who campaigned for the bill.