Democrat Dan Gecker speaks to a crowd of supporters at an election party in Richmond on Tuesday. Republican Glen Sturtevant narrowly defeated Gecker to hold a seat currently held by retiring GOP Sen. John Watkins. (Steve Helber/Associated Press)

Memo to Michael Bloomberg: If you want to help Virginia Democrats, stay home.

He is a major reason why Democrats appear to have lost the crucial 10th state Senate district in yesterday’s election.

Republican Glen H. Sturtevant, a 33-year-old lawyer and Richmond School Board member, apparently defeated developer Dan Gecker in what was the most expensive state race of its type ever in Virginia. Gecker, who lost with 47 percent of the vote to Sturtevant’s 49 percent, refused to concede last night (he conceded thsi morning). He wanted votes verified in the reddest part of his strangely shaped district.

The race appears to have come down to 5,000 votes in mostly rural Powhatan County, a sprawling spot with about 28,000 people, a quaint town center and a Wal-Mart creeping in from western Richmond’s exurban sprawl zone.

The defeat is a big one for Gov. Terry McAuliffe (D), who properly made gun control a major issue given all the bullet blood spilled in the Old Dominion over the years.

But McAuliffe approached this as he would something on the national level: He tapped his wealthy pals. Before you could say “lock and load,” an advocacy group affiliated with former New York mayor Michael Bloomberg decided to put $700,00 in gun-control money into ads supporting Gecker.

Outsiders have long put money in Virginia races, but this one backfired. Powhatan is heavily Republican in the mashup of the 10th District, which also includes some of Richmond’s bluest neighborhoods.

It is a place where one sees a fair number of pickups with oversize tires, “Don’t tread on me” license plates and radios that track deer dogs. The landscape is dotted with dairy farms and mini-horse farms.

Smack in the middle is the Powhatan Wildlife Management Center, 4,462 acres of mixed pine-gum forest and reclaimed former dairy lands. When my German shepherd was alive, I’d take her running there — although not in hunting season.

Powhatans would not take kindly to a New York boo-bah telling them what they should do with their guns. They don’t want anyone deciding whether they can buy a giant Dr Pepper from Hardee’s. Damn the cholesterol, they want their soupy gravy on their sausage biscuits. They do not want the nanny state.

Sturtevant and his team were smart to pour it on in otherwise-forgotten Powhatan and, to some extent, Chesterfield County, whose gigantic boom years in the 1960s and 1970s were fueled by white flight from urban Richmond.

Gecker, McAuliffe and the Democrats were beaten by a stick they gave the GOP. Now, McAuliffe will continue to face legislative roadblocks in the General Assembly since the Republicans control the House of Delegates and should retain control of the state Senate.

It goes to show just how little McAuliffe understands Virginia voters. This dashes any hope he had of making his last two years in office effective. Bringing in the Bloomberg-affiliated group was a bonehead play.

Peter Galuszka is a regular contributor to All Opinions Are Local. He sometimes freelances for Bloomberg News.