Marijuana would become a major sector overnight if legalized across the nation, with tens of billions of dollars in revenue for governments at all levels, Barclays said in a report Wednesday.

"We estimate that the total US cannabis market, if legalized today, could be worth $28 billion, increasing to $41 billion by 2028 on a pre-tax basis," Barclays analysts said in a note to investors.

At $41 billion, the cannabis market "could generate almost $28 billion of tax revenues across all levels of government" if taxed at the same level as tobacco, Barclays said. The analysts looked at the three states where cannabis is legal — Colorado, Washington and Nevada — and found that tax revenues from pot are already ahead of alcohol tax revenues and, in the case of Colorado, already exceeding tobacco tax revenues.

"While no bonds backed by cannabis tax revenues have been placed thus far, if federal approval is granted, the cannabis muni bond market will likely flourish, amounting to billions if not tens of billions of dollars, in our view," Barclays said.

Barclays' estimate for the U.S. tax opportunity comes from a 2017 survey, which estimated that 26 million Americans above the age of 12 "were users of marijuana," or nearly 10% of the total population. Broadly speaking, monthly cannabis use by Americans has steadily increased over the past 15 years across all age groups.

U.S. marijuana companies are jockeying for position with the expectation that weed will be legalized across the nation.

Curaleaf Holdings, the largest American cannabis company by market value, announced Wednesday a $950 million all-stock deal to buy cannabis company Cura Partners, which makes cannabis oils. The deal comes a couple weeks after Canadian marijuana giant Canopy Growth announced a $3.4 billion acquisition of Acreage Holdings. The latter deal will take place only if and when cannabis is legalized in the U.S.