My wife and I lived in Somerville when we first got married, in an old house near the top of Winter Hill. It was the early '90s. We rented a two-bedroom for $750—at least a third less than we'd have paid in Boston.

At the time, Somerville had a young new mayor named Michael Capuano, a local guy who'd run a tough campaign to overcome accusations that he was part of the city's intractable and allegedly corrupt old guard. Capuano, though a graduate of Dartmouth College, played up his working-class roots. He seemed a likely mayor for a city that journalists often described as "hardscrabble."

Some friends at the time questioned our decision to live in Somerville, which hadn't yet seen the gentrification that had swept through Boston, Brookline and Cambridge. To some people, it seemed shabby, a once-historic place whose native charm had been obscured by factories, strip malls and acres of old three-decker apartment buildings.

But Somerville was changing. The lure of old mills and funky retail space in the city's many historic cobblestoned squares was beginning to attract adventurous and often visionary small-scale redevelopment, the kind that was taking place in other parts of greater Boston and in places like Northampton and Providence and Burlington. So-called "white ethnic" neighborhoods were becoming more diverse, as were politics in the city.

As mayor, Capuano didn't seem in tune with the changes taking place in his city. He focused his rhetoric on plans to combat crime and urban blight, improve the schools and build more parks. A fiery campaigner with a reputation for being profane when angry and angry a lot, he didn't seem overly interested in the nuances of urban planning or the de rigueur pursuit of public/private partnerships. If he had any great vision for the city, it didn't rise above the endless petty political controversies he seemed to inspire.

I remember reading at the time about Capuano threatening to kill a dog with a baseball bat in 1993, a story recently resurfaced by the Boston Globe in a profile of Capuano, now a six-term congressman, as he runs for Ted Kennedy's old seat in the U.S. Senate. Capuano brandished the bat when he and his son, while playing baseball, were made uncomfortable by a couple of unleashed dogs running nearby. Under media scrutiny, Capuano refused to back down, insisting that he had every right to protect his kid. Rather than hurting him, the incident seemed to endear Capuano to voters in Somerville.

What I remember most about Capuano from his early days in Somerville City Hall was his defiant attitude toward Boston, a city he referred to in speeches as if it were synonymous with "elite." Capuano seemed driven by the collective embarrassment and wounded pride of the city that had long been known by the unflattering nickname "Slumerville." Somerville's stigma gave him context for his aggressive, often angry style as a campaigner and mayor.

As colorful as he was as mayor, Capuano didn't strike me as a likely successor for Joseph P. Kennedy's congressional seat. We'd left Somerville by the time Capuano entered the race for the Eighth Congressional District in 1998. I remember being faintly amused by his candidacy—and utterly shocked by his victory.

There is little doubt that Capuano, now a close ally of House Speaker Nancy Pelosi and with a reputation as an insider and master of machine politics, has a chance of winning the coming Senate race. To do it, however, he will need to get by state Attorney General Martha Coakley, the other big name in the race, and two other Democrats in the hunt, Alan Khazei and Steve Pagliuca. Polls continue to show Coakley with a commanding lead heading toward the primary, with Capuano a distant third.

In other times, Martha Coakley might have made a perfect foil for Capuano. Serious, tough, polished and professional, Coakley, a career prosecutor, has long been a darling of reform-minded progressives that Capuano once disparaged as elitist. Coakley seems to have moved inexorably upward since she entered public life in the 1980s and quickly became a rising star in Middlesex County District Attorney Scott Harshbarger's office. Unlike Capuano's, her rise seems inevitable, well earned.

In a recent swing through North Adams, Coakley's home town, Capuano reached for an old theme to explain how his years in Somerville colored his view of politics: "Even right next to Boston," he said, "we know it's easy to be forgotten." Capuano is more polished than he was 20 years ago, and he enters the race with one of the more liberal voting records in Congress. To have a chance to catch Coakley, however, he'll have to take the risk of showing us more of the combative, angry style that animated his early campaigns.