The measure passed the state House of Representatives 104-88, with three Republicans joining all Democrats in opposing it, The Philadelphia Inquirer reported. The chamber held an unusual three-day debate on the bill.
Voters will have to present photo identification that can include a driver's license, student ID from an in-state college, passport or ID from a nursing home or assisted living facility. A court challenge appears almost certain, the newspaper said.
The governor, like Republicans in other states, says the law ensures all votes will be meaningful.
"This is a law of prevention," Corbett said. "It is to prevent voter fraud. And I believe it needs to be prevented."
Democrats say there is scarce evidence of vote fraud and voter ID laws are aimed at keeping the poor and minorities from the polls. Rep. Thaddeus Kirkland, a Philadelphia Democrat, called the Pennsylvania bill a "Jim Crow voter suppression law."
The state plans to use the April 24 primary as a test run, with voters asked if they have identification but not required to show it. On Nov. 6, voters without photo ID will be able to cast provisional ballots and must present identification within six days.
Wisconsin business offering 'therapeutic cuddling' forced to close
Ohio crash that killed two caught on camera [VIDEO]