Afraid of the competition from a 7-year-old with a makeshift lemonade stand, a group of fair vendors got bureaucrats to squeeze the kid out.

Soon-to-be second-grader Brendan Mulvaney ran afoul of government regulators last Friday when vendors at the Saratoga County Fair in upstate Ballston Spa whined to a state health inspector that he had no permit to sell refreshments from his family’s front deck just outside the fairgrounds.

Being just a kid, he was also undercutting their pricey drinks by nearly 90 percent, selling lemonade for just 75 cents — a significant discount from the $7 cups inside the fair. He also peddled $1 snow cones and bottled waters.

The vendors griped to a state health inspector doing a routine inspection of the fair, and his next visit was to the Mulvaneys’ home.

He promptly ordered the stand shut down, leaving the family shocked.

“We didn’t think that we needed [a permit], we didn’t know that we needed one,” said Brendan’s mom, Jodi Mulvaney. “It didn’t even cross our minds.”

At first, officials said they couldn’t explain what happened because the Department of Health doesn’t regulate lemonade stands. The state agency — which does food inspections in much of upstate — even issued a public apology Sunday to Brendan “for any inconvenience.”

“We are working to better understand the situation but in the meantime want to assure the community that DOH does not issue permits for or oversee lemonade stands,” spokeswoman Jill Montag told the Albany Times Union.

But hours later, the bureaucrats did an about-face and declared a permit was indeed required, even for a stand on the Mulvaneys’ own porch.

“In the opinion of the inspector, the lemonade stand was in line with vendors inside the fair. He did not see any child,” DOH spokesman Gary Holmes said. “I have zero interest in creating conflict with a family, and certainly not a cute little kid.”

“It’s not about big government overreach; it’s about ensuring safe conditions.”

Brendan’s dad, Sean Mulvaney, fumed to the Times Union, “Yesterday, they issue an apology and today I need a permit.”

The permit costs $30 and is good for a year. Holmes said the DOH would expedite any application from the Mulvaneys.

The reversal left Brendan’s mom and dad frustrated, especially considering the stand had been operating for three years without incident.

“We’re just going to sit down as a family and figure out what we’re going to do here,” mom Jodi said. “It’s just what we did. It’s America.”

State Sen. Jim Tedisco (R-Saratoga) visited the kid’s stand Sunday afternoon and said the state government had gone haywire.

“There’s nothing that says America more than apple pie and kids running lemonade stands,” he said in a statement. “What has our state government come to?”

There was no immediate comment from Gov. Cuomo’s office.

Additional reporting by Shannon DeCelle