FBI agents raided the upstate home of a payroll company owner embroiled in a potential $35 million fraud, the bureau said Tuesday.

A squad of investigators arrived in a half-dozen vehicles and spent about an hour combing through ValueWise CEO Michael Mann’s luxury lakeside house in Edinburg late Monday afternoon, according to a report by the Daily Mail.

Camera flashes were seen through the second-story windows of a partially completed addition, the Mail said.

Mann and his wife, Kim, moved to the sprawling, $500,000 house in Edinburg, about 45 miles northwest of Albany, about 18 months ago, the Mail said.

Kim refused to open the door when a reporter knocked and said her husband wouldn’t comment, the Mail said.

“I’m calling 911. Bye,” she added.

A spokeswoman for the FBI’s Albany field office confirmed that “FBI personnel were at that address yesterday in connection with an ongoing federal investigation.”

“Because it’s an ongoing investigation, [Department of Justice] policy prevents me from providing any further details,” spokeswoman Sarah Ruane said in an email to The Post.

The FBI has said it’s “investigating allegations of criminal conduct related to MyPayrollHR,” a ValueWise subsidiary that abruptly abandoned its offices in Clifton Park on Sept. 5.

The following day, Mann called the Edinburg Building Department “in a panic” about the permit he got last year to build a two-car garage with a 960-square-foot bedroom and bathroom above it, Building Superintendent Terry Anthony told the Mail.

Mann said that “he might have to sell and I would soon understand why,” Anthony said.

“He wanted to know what would happen to the permit if he sold. I told him it applies to the property, not the owner,” Anthony added.

MyPayrollHR processed payrolls for about 4,000 companies across the country, and its sudden shutdown resulted in countless workers having one or more automatic payroll deposits withdrawn without warning, according to reports.

In the wake of the scandal, Albany-based Pioneer Bancorp told federal regulators that it “recently became aware of fraudulent activity … by an established business customer” of its Pioneer Bank, which the Albany Times Union has identified as MyPayrollHR.

Pioneer’s filing with the Securities and Exchange Commission said it had loaned the company $16 million as part of a $36 million loan it originated, and that its “potential exposure” also included $19 million of “deposit activity.”