College professor David Brat’s primary win in Virginia’s 7th congressional district caught the political world by surprise, particularly the man he defeated, House Majority Leader Eric Cantor. But a close look at the VA-07 terrain shows that Mr. Brat had a few points in his favor going in.

When you look at the area around Richmond on the map below, you’ll see a lot of yellow counties, including Chesterfield, Culpepper, Goochland, Hanover, Louisa, New Kent and Orange parts of which are all in Virginia’s 7th district. Those are Exurbs in the American Communities Project.

Looking at the total vote in those seven counties Mr. Brat trounced Mr. Cantor, beating him by about 16 percentage points and 6,400 votes. The vote coming from the other three counties in the district was much closer, with Mr. Brat beating Mr. Cantor by only four points and about 800 votes.

That doesn’t mean Mr. Brat’s win was some kind of foregone conclusion – Mr. Brat himself called the win “an unbelievable miracle.” Mr. Cantor had a position of power in Washington and vastly outspent his opponent. And none of this means demographics is destiny.

But a big part of any election is the terrain on which it takes place and the terrain in Virginia’s 7th looks good for a tea party candidate such as Mr. Brat. It certainly was on Tuesday night.

There may also be a bit of irony in Tuesday night results.

The current configuration of Virginia’s 7th district rose out of a Justice Department ruling in 1993 that there needed to be a “majority-minority” district around Richmond to serve the large African American population there. That district, now Virginia’s 3rd, is indeed solidly Democratic and the 7th is solidly Republican.

But Mr. Cantor actually did well in Richmond, winning 54% of the vote from the sliver of 7th that sits within the city’s boundary. It was everything else that did him in.

In the end, the redistricting around Richmond created a district that is indeed safer for the GOP, but also, it seems, one that is driven much more by a big exurban population that can make things uncomfortable for an incumbent Republican. Ask Mr. Cantor.

About Washington Wire

Washington Wire is one of the oldest standing features in American journalism. Since the Wire launched on Sept. 20, 1940, the Journal has offered readers an informal look at the capital. Now online, the Wire provides a succession of glimpses at what’s happening behind hot stories and warnings of what to watch for in the days ahead. The Wire is led by Reid J. Epstein, with contributions from the rest of the bureau. Washington Wire now also includes Think Tank, our home for outside analysis from policy and political thinkers.