Unusually, the area became known for its Victorian-era correctional institutions and so-called lunatic asylums. Wandsworth Prison, the largest prison in Britain, was built in 1851, and is still in operation. The original building stands firm, surrounded by a 20-foot wall laced with barbed wire, though refurbishments in the 1980s and ’90s improved sanitation and added in-cell electricity. Today, the impressive penitentiary — with its imposing wooden door, thick covering of soot and notoriety as a gang-riddled institution where, the BBC reports, prisoners import drugs via cellphone-controlled drones — gives off a sort of neo-Dickensian air. But Oliver Twist would most likely have been found at the nearby Friendless Boys Home for children who “have lost their characters or are in danger of doing so.”

Up through the 20th century, Tooting remained suburban in the minds of many Londoners. In the late ’70s, the area entered Britain’s collective consciousness in the form of Wolfie Smith, the protagonist of the wildly popular BBC comedy series “Citizen Smith,” which was set in Tooting. In the show, Smith is a beret-wearing Communist and founder of the fictional Tooting Popular Front, which seeks “Freedom for Tooting!” The gag was all the sillier for its suggestion that Tooting — out-of-the-way suburban Tooting — would ever find itself at the vanguard of a revolutionary class struggle.

Mr. Khan was born at St. George’s Hospital in Tooting in 1970, the fifth of eight children, seven boys and a girl, in a family of Pakistani immigrants that came to London shortly before Mr. Khan’s birth. Space at home was tight. The Khans lived in a small three-bedroom house on the Henry Prince Estate, which was opened in 1938 as a 10-acre public housing facility with nearly 300 apartments. Mr. Khan slept on a bunk bed until he was in his 20s.

Today, the estate is tidy and quiet, dotted with inner courtyards, tiny playgrounds and signs prohibiting ball games. At the back, a parking lot meets the slow-moving Wandle River, which is lined with a thicket of trees and shrubs. One afternoon in late fall, a family of ducks made its way slowly up the river, and a handsome young father stopped to let his small daughter watch the birds pass. On the bank, near the ducks, lay a Snickers wrapper, several garbage bags, a boot with the top cut off, a pair of green cargo pants, an empty bottle of brandy, an antibacterial hand wipe and a lone latex medical glove.

London’s mayor almost always speaks fondly of Tooting, but there are exceptions. During his campaign, Mr. Khan recounted early memories of racism in the area: nasty enough to send him and his brothers to the local Earlsfield Amateur Boxing Club, where the boys learned to fight and where one of Mr. Khan’s brothers still works as a coach. Mr. Khan said his daughters have never received that kind of racial abuse. Some parts of yesteryear’s Tooting, to be sure, are unworthy of nostalgia.