Democrat Tim Kaine, a U.S. Senate candidate in Virginia, has for months endured attacks from his would-be Republican opponent over Kaine's friendship with the unpopular President Obama. But Kaine found a way to turn the tables.

The former Virginia governor and Democratic National Committee chairman is now trying to tie Republican George Allen to the divisive social agenda surging through the state's Republican-run General Assembly in hopes of undercutting Allen's support among independent voters.

Virginia Republicans eager to flex their new majority status in Richmond are pushing a number of controversial measures on abortion, gay rights, guns and other initiatives shunned for decades under Democratic control. But every bill conservatives advance gives Kaine ammunition to use against Allen.

Both national parties consider the Virginia race crucial to determining the future balance of power in the Senate, where Democrats now hold a 53-47 majority. The seat being vacated by retiring Sen. Jim Webb, a Democrat, is one of nine open seats in play in the fall elections and will be among the most hotly contested.

Neither Kaine nor Allen has officially claimed their respective party's nomination, but that hasn't stopped them from portraying each other as ideological extremists who represent the worst their political party has to offer.

When the General Assembly last week advanced a bill that would require a woman to undergo an ultrasound exam before getting an abortion, Kaine's campaign immediately bombarded supporters with emails, web ads and Twitter messages urging them to fight the Republican bill.

"What's happening in Richmond right now is bad for Virginia women, it's bad for Virginia's image, and it's bad for Virginia's businesses," Kaine said.

Allen hasn't taken a position on the ultrasound bill, which now faces defeat after Gov. Bob McDonnell sought to soften its requirements. But Allen does support a so-called personhood bill that would give a fetus legal and civil rights. And even though Virginia lawmakers killed the personhood bill last week, Allen said he supports making it a national law.

Allen spokesman Bill Riggs said Kaine's attempt to shift the focus to social issues won't sit well with voters most concerned about the economy.

"Tim Kaine must think he is running to be a member of the General Assembly," Riggs said.

Still, the Republican General Assembly has allowed Kaine to move to offense, and he now is now warning Virginians that Allen would take up the far right's political agenda on Capitol Hill.

"The debate at the state level is a good indication of the kind of debate we would have at the federal level if George Allen pushes forward what he proposes," Kaine said.

Kaine and Allen are locked in a dead heat, a dozen polls conducted since last year show. But if the social issue remain in the spotlight, Kaine is likely to benefit, said Kyle Kondik of the University of Virginia Center for Politics. Most Virginians side with Kaine on issues like the ultrasound bill, he said.

"The election is going to be a lot about the economy and national issues," Kondik said. "But Kaine may have some good ammo to use against Allen on these things if the General Assembly is perceived to be going too far on the social issues. They have a winning issue on that."