RICHMOND — The federal government shutdown has inspired TV and radio ads in the Virginia governor’s race, with Democrat Terry McAuliffe and Republican Ken Cuccinelli II each accusing the other of Washington-style intransigence.

McAuliffe released a television ad Thursday that seeks to link Cuccinelli, the state’s attorney general, to Sen. Ted Cruz (R-Tex.), a key figure in the shutdown fight and a fellow tea party favorite. Cuccinelli put out a radio spot that says McAuliffe, the former Democratic National Committee chairman, has sided with dug-in Democrats in Washington and threatened to shut down state government if he doesn’t get his way on Medicaid expansion.

McAuliffe’s ad played up Cuccinelli’s ties to Cruz, who helped engineer the shutdown in a bid to defund the Affordable Care Act. Titled “Over the Brink,” the 30-second spot mixes news coverage about idled federal workers from Virginia with a 2006 video snippet of Cuccinelli describing a state budget battle waged two years prior: “I’d have taken them [Democrats] right to the brink. I’d have gone right over the brink.”

A picture of Cruz flashes on the screen, along with a written message: “Ted Cruz’s Tea Party shutdown is hurting Virginia.” A TV commentator is heard saying that Cruz is expected to campaign with Cuccinelli at some point.

Cruz and Cuccinelli are scheduled to appear at a fundraiser for the Family Foundation Saturday night in Richmond, but it is not a formal campaign event.

Cuccinelli, the state’s attorney general, shares Cruz’s antipathy toward the federal health-care law known informally as Obamacare. Cuccinelli was the first attorney general in the nation to file a lawsuit against it, dispatching aides to the courthouse minutes after President Obama signed it into law in 2010.

But Cuccinelli has said he does not support efforts to shut down the government over the law. In recent days, he has called for federal workers to be paid during the shutdown, and for members of Congress to go without their paychecks until the issue is resolved.

His campaign also said that the video snippet from 2006 was taken out of context, and that Cuccinelli had proposed enacting an interim spending plan that year to keep state government working in case a budget deal could not be reached.

“Terry McAuliffe is the only candidate in this race who has called for a government shutdown and he’s the only candidate who has said one side shouldn’t negotiate with the other to work out a solution,” Cuccinelli spokeswoman Anna Nix said via e-mail. “Make no mistake, McAuliffe will bring Washington, D.C. style tactics and brinksmanship straight to Richmond.”

Cuccinelli launched an ad of his own, a 60-second radio spot titled “Shutdown.”

“It’s a failure of leadership: A government shutdown, dealing a blow to thousands of Virginia families,” a male narrator says. “All because Washington politicians failed to come together to find a solution. And Terry McAuliffe deserves part of the blame.

“McAuliffe said he’s against compromise, against working together to find solutions. The Washington Post reports Terry McAuliffe sided with those who refused to even negotiate. It’s nothing new for Terry McAuliffe. He’s already threatened to shut down Virginia’s government if his budget plan isn’t supported. A budget plan The Washington Post already called ‘not sustainable or realistic.’ The Richmond Times-Dispatch says Terry McAuliffe is a ‘deeply unserious’ candidate and is not ready to be governor. Cuccinelli disagrees with Terry McAuliffe and the Washington politicians. Cuccinelli opposes a government shutdown and as governor will provide serous leadership to solve problems.”

The ad refers to McAuliffe’s promise, made several times on the campaign trail, not to sign any state budget plan that does not include money to expand Medicaid. The ACA allows states to extend the federal-state health-care program to more people, with the federal government offering to pay the full cost initially, and gradually ramping down to 90 percent.

Given opposition to expansion in Virginia's GOP-dominated House, Republicans have said McAuliffe’s promise amounts to a threat to shut down state government over Medicaid. McAuliffe has since softened his language but has stood firmly by expansion, saying it would provide health insurance to 400,000 Virginians, pump $2 billion into the state economy and create thousands of jobs.

Cuccinelli has said the federal government is too broke to make good on its funding promise, leaving Virginia on the hook for billions in new Medicaid enrollees.

“This is shockingly false and misleading coming from Ken Cuccinelli who said he wanted to take Virginia ‘over the brink’ and is campaigning with Ted Cruz, the architect of the shutdown, on Saturday,” McAuliffe spokesman Josh Schwerin said via e-mail. “Instead of lying about Terry McAuliffe, Cuccinelli needs to condemn Ted Cruz and his Tea Party allies for forcing a government shutdown to further their shared ideological agenda.”