Bitcoin will be treated by the Internal Revenue Service as property, not currency, the IRS said in an announcement on Tuesday.

“For federal tax purposes, virtual currency is treated as property,” the United States government agency acknowledged. “General tax principles applicable to property transactions apply to transactions using virtual currency.”

Bloomberg News reported that Tuesday’s decision means the IRS will treat Bitcoin with the same rules used to govern stocks and barter transactions, and called the announcement the “first substantive ruling on the issue” made by the US government since the digital cryptocurrency was launched in 2009.

Bitcoin has since entered the mainstream and skyrocketed in popularity lately, and even was the subject of a controversial cover-story published earlier this month in Newsweek.

With Tuesday’s decision, though, the federal government is for the first time outlining, at least to a degree, how to handle Bitcoin.

Elsewhere in the statement, the IRS said that anyone who has Bitcoins must calculate its value “as of the date of receipt” to determine if a gain or loss was realized, and report the results to the government.

“For US tax purposes, transactions using virtual currency must be reported in US dollars,” the IRS added. “Therefore, taxpayers will be required to determine the fair market value of virtual currency in US dollars as of the date of payment or receipt.”

“A taxpayer who receives virtual currency as payment for goods or services must, in computing gross income, include the fair market value of the virtual currency,” the IRS continued, and any employers who use Bitcoin to pay their staff must now file a W-2 declaring such.

Additionally, Bitcoin traders will be subject to capital gains taxes if they hold the cryptocurrency as a capital asset, the IRS said.

“Today’s IRS guidance will provide certainty for investors, along with potential income-tax liability,” Richard Rubin and Carter Dougherty wrote for Bloomberg. “Under the ruling, purchasing a $2 cup of coffee with Bitcoins bought for $1 would trigger $1 in capital gains for the coffee drinker and $2 of income for the coffee shop.”

The Washington Post reported last November that more than 200 real-world businesses in the US accept Bitcoin, and coffee shops, eateries and retailers from coast-to-coast are increasingly allowing customers to pay with virtual currency — or “property,” as far as the IRS is concerned.

The US Congress has yet to issue a ruling with regards to Bitcoin, but Sen Dean Heller (R-Nevada) said recently that, “While we must ensure proper safeguards, it is my hope that… we can help maintain an environment that continues to promote new financial technologies and innovative growth.”

“Bitcoin is a payment innovation that’s taking place outside the banking industry. To the best of my knowledge there’s no intersection at all, in any way, between Bitcoin and banks that the Federal Reserve has the ability to supervise and regulate. So the Fed doesn’t have authority to supervise or regulate Bitcoin in anyway,” Janet Yellen, the chair of the central bank, told Congress last month.