Updated

Virginia gubernatorial candidate Ralph Northam’s campaign is being accused of playing a role in a controversial ad that was pulled last week, as disclosure forms reveal ties to the political group behind the incendiary commercial – though the Democrat’s campaign denies it.

The ad shows a Confederate-flag-flying pickup truck with a bumper sticker for Northam's opponent, Republican Ed Gillespie, chasing down and cornering several Hispanic and Muslim children in a dark alley. The ad sparked outrage as Gillespie and others condemned it for falsely portraying his supporters as violent racists, ahead of Tuesday’s gubernatorial election.

A group called Latino Victory Fund created the ad but pulled it after a terrorist reportedly shouting "Allahu Akbar" murdered eight people in New York City using a pickup truck.

Northam distanced his campaign from the ad, telling WAVY-TV, "That commercial did not come from our campaign. It certainly is not a commercial that I would have wanted to run."

But disclosure forms suggest the Northam campaign may have been involved, as the Northam campaign reported a $62,729.60 "in-kind" contribution in the form of "media" from the Latino Victory Fund shortly after the ad came out. Under Virginia law, a media contribution is "in-kind" only if the campaign worked with the outside group on the ad.

Phil Kerpen, president of free-market think tank American Commitment, first discovered the disclosure.

"Northam claimed to know nothing about the ad -- on the very same day his own campaign filed an official disclosure accepting the ad as an in-kind contribution," Kerpen said.

He points to Virginia law, which says a campaign must have direct involvement in a project for it to be an "in-kind" contribution:

NorthamGillespie

Democrat Ralph Northam, left, and Republican Ed Gillespie face off Tuesday in the Virginia gubernatorial race. (AP)

"...the candidate or an agent of the candidate's campaign committee must have either expressly requested or suggested... that the expenditure be made," a Virginia government guidebook describing the law reads, "or... have material involvement in devising the strategy, content, means of dissemination, or timing of the expenditure."

But Northam spokeswoman Ofirah Yheskel told Fox News that, despite the disclosure, the campaign had nothing to do with the ad.

"The Northam campaign did not authorize the ad nor did it see the ad before it was released," she said in a statement, adding that, "Ralph Northam would not have run this ad and believes Virginians deserve civility, not escalation."

About the disclosure documents, she said it was only reported that way because the campaign worked with Latino Victory Fund in other ways: "In Virginia, groups must report in-kinds for activities like canvassing and data-sharing. Because there are no independent expenditures, and Latino Victory Fund has been sharing data with us, they had to report any activity involving the election as an in-kind."

But Kerpen noted that it was the Northam campaign, not Latino Victory Fund, that labelled the ad as an in-kind contribution -- a fact that can be confirmed on the Virginia Department of Elections website -- and said the group's other activities like canvassing have nothing to do with how the ad would be treated in disclosure forms.

Yheskel did not respond to a follow-up question about the fact that the disclosure came from Northam's campaign.

Kerpen also challenged Yheskel's explanation of the law, saying, "If Northam had not coordinated on the expenditure, they would have filed nothing related to it" -- since it would not have been an "in-kind" contribution under the law.

Could the Northam campaign have simply made the disclosure by mistake, thinking they had to do so because they worked with the group in other ways?

"No chance they filed by mistake -- they would have said so and corrected immediately," Kerpen said, decrying the ad as “race-baiting.”

Latino Victory Fund did not respond to questions about any coordination with the Northam campaign.

Maxim Lott can be reached on Twitter at @maximlott