The poll from Connecticut's Quinnipiac University focused on an issue being debated in the Pennsylvania Legislature and among the Democrats hoping to challenge Republican Gov. Tom Corbett's re-election bid.
The survey showed that 85 percent of voters believe adult Pennsylvanians should be allowed to use marijuana for medical purposes if their doctor prescribes it.
But voters are narrowly split on whether possession of small amounts of the drug should be legal for recreational use. According to the poll, 48 percent support such legalization and 49 percent oppose it, a gap within the survey's margin of error.
Respondents also split on whether pot is a gateway to hard drugs: 48 percent said no, 46 percent said yes.
The poll included telephone interviews with 1,405 Pennsylvania voters from Feb. 19-24. The margin of error is plus or minus 2.6 percentage points.
Asked whether they had ever tried marijuana, 55 percent of the respondents said no and 44 percent said yes.
Forty-nine percent said they believe that marijuana is as dangerous as alcohol, while 33 percent think it is less dangerous and 15 percent said it is more dangerous.
Sixty-five percent said they would be very uncomfortable riding in a car driven by someone who had smoked or consumed a moderate amount of marijuana and 19 percent said they would be somewhat uncomfortable.
Colorado and Washington became the first states to approve recreational marijuana use in 2012. Medical marijuana is legal in 20 states and the District of Columbia.
At a state Senate hearing in January, parents of children afflicted by epileptic seizures pleaded with lawmakers to approve a bill to legalize the medical use of marijuana, saying it could provide relief from the youngsters' pain that conventional medications cannot. The bill sponsored by Sen. Mike Folmer, R-Lebanon, is pending in the Law and Justice Committee.
In the seven-way Democratic primary race, the proposed legalization and taxation of marijuana is central to John Hanger's campaign. While the other candidates generally support allowing medical use of marijuana, they have not joined Hanger's call for legalization.
Hanger, a former state environmental protection secretary and former state utility regulator, advocates the immediate legalization of medical marijuana followed by decriminalization of possession of small amounts of the drug. That would be followed by full-fledged legalization by 2017, the next governor's third year in office.
Hanger claims his proposal would relieve crowded conditions in state prisons, save tax money now being spent to prosecute and punish people for possession of marijuana and generate hundreds of millions of dollars for education and health programs.
At a Friday night candidates' forum in Harrisburg, York businessman Tom Wolf said his family's building-products company provides "a second chance" to otherwise qualified job applicants if they have been convicted of possessing less than an ounce of marijuana.
Without such special consideration, such young people are "absolutely shunted aside from the workforce," he said.