Pew Research Center has released its latest survey on where Americans stand on marijuana legalization. Pictured: Plants at the marijuana farm Los Sueñ–os Farms LLC in Pueblo County, Colorado in September 2016. (Vince Chandler, The Denver Post)

Millennials, Boomers or Gen X: Who favors marijuana legalization the most in the U.S.?

Public support for marijuana legalization continues to hit new heights, but opinions on the matter do continue to be divided by age and ideology, the latest Pew Research Center poll shows.

The share of Americans who favor legalization totals 57 percent, according to a Pew Research survey of 1,201 U.S. adults conducted in late August and early September. The survey showed that 37 percent believed marijuana should be illegal and another 5 percent were undecided. The margin of error was plus or minus 3.2 percentage points.

Public opinion has been shifting more favorably toward legalization over the long-term, but has picked up in steam during the past decade, Pew found.

Nearly 18 months ago, 53 percent of adults surveyed supported legalization. A decade ago, that share was 36 percent, according to Pew.

Back in October 1969, only 12 percent of adults surveyed were in favor of legalizing marijuana, according to Pew, referencing Gallup data.

The bulk of the support behind legalization now — a time when half of the states have legalized the medical use of marijuana, a handful of others have legalized adult-use and several more are voting on the issue in November — is coming from the younger generations. Millennials’ support for legalization has grown to 71 percent from 34 percent a decade ago, according to Pew.

More than half of Generation X (defined by Pew as being between the ages of 36 and 51) and Baby Boomers (52-70) favor legalization with shares of support at 57 percent and 56 percent, respectively. Members of the Silent Generation (71-88) are most opposed to legalization with the survey showing 33 percent support.

When it comes to politics, the Pew survey shows a political divide:

By more than two-to-one, Democrats favor legalizing marijuana over having it be illegal (66% vs. 30%). Most Republicans (55%) oppose marijuana legalization, while 41% favor it.

Republicans are internally divided over marijuana legalization. By a wide margin (63% to 35%), moderate and liberal Republicans favor legalizing the use of marijuana. By contrast, 62% of conservative Republicans oppose legalizing marijuana use, while just 33% favor it.

The differences among Democrats are more modest. Liberal Democrats are 23 percentage points more likely than conservative and moderate Democrats to favor legalization (78% vs. 55%).

Click here to read more about the Pew survey and past surveys.