Updated

Thomas Menino, whose folksy manner and verbal gaffes belied his shrewd political tactics to govern as Boston's longest-serving mayor and one of its most beloved, died Thursday. He was 71.

Spokeswoman Dot Joyce said in a statement that Menino died in the company of his family and friends. He was diagnosed with advanced cancer in February 2014, shortly after leaving office, and announced Oct. 23 he was suspending treatment and a book tour so he could spend more time with family and friends.

Menino was first elected in 1993 and built a formidable political machine that ended decades of Irish domination of city politics, at least temporarily. He won re-election four times. He was the city's first Italian-American mayor and served in the office for more than 20 years before a series of health problems forced him, reluctantly, to eschew a bid for a sixth term.

"I can run, I can win and I can lead, but not in the neighborhoods all the time as I like," Menino, a Democrat, told an overflow crowd at Boston's historic Faneuil Hall on March 28, 2013.

Less than three weeks after that announcement, two bombs exploded at the finish line of the Boston Marathon, killing three people and injuring more than 260. Menino, who had undergone surgery on a broken leg just two days earlier, checked himself out of a hospital to help lead his shaken city through the crisis.

At an interfaith service three days after the bombings, Menino, in a symbolic act of personal defiance, painfully pulled himself to his feet from his wheelchair to declare that no act of violence could break Boston's spirit.

He was in an SUV in nearby Watertown at the end of a daylong manhunt when Police Commissioner Edward Davis informed him that the surviving bombing suspect had been captured. Menino's tweet: "We got him."

President Barack Obama hailed Menino as "bold, big-hearted, and Boston strong." Reaction poured in from leaders around the country, including Secretary of State John Kerry, a longtime U.S. senator from Massachusetts, who said: "Tom Menino was Boston."

Gov. Deval Patrick ordered flags lowered to half-staff at the Statehouse and all other state buildings in Boston until further notice.

Menino was anything but a smooth public speaker and was prone to verbal gaffes. He was widely quoted describing Boston's notorious parking shortage as "an Alcatraz" around his neck, rather than an albatross.

He often mangled or mixed up the names of Boston sports heroes -- once famously confusing former New England Patriots kicker and Super Bowl hero Adam Vinatieri with ex-Red Sox catcher Jason Varitek. But while such mistakes might sink other politicians in a sports-crazed city, they only seemed to reinforce his affable personality and ability to connect with the residents he served.

"I'm Tom Menino. I'm not a fancy talker, but I get things done," he said in his first TV ad.

In an interview with The Associated Press in March, Menino said he "loved every minute" of being mayor, even during the city's darkest days. He credited his staff and others, downplaying his own role.

"I just did my job -- nothing special," he said.

Thomas Michael Menino was born on Dec. 27, 1942, in the city's Hyde Park neighborhood. A former insurance salesman, he caught the political bug while working as a legislative aide to state Sen. Joseph Timilty. He first earned elective office as a district city councilor in 1984.

Menino became the council's president in 1993 and was automatically elevated to mayor when then-Mayor Raymond Flynn was named U.S. ambassador to the Vatican. While that prompted some to initially chide Menino as an "accidental mayor," he quickly proved his own political mettle, winning a four-year term later that year.

He never sought nor showed interest in running for higher office. Mayor, it seemed, was the only political job to which he aspired.

His tireless public schedule amazed and exhausted many of his closest aides. In his new memoir, "Mayor For A New America," he made clear that was his greatest legacy.

"I paid attention to the fundamentals of urban life -- clean streets, public safety, good schools, neighborhood commerce," Menino wrote in the memoir, released in October 2014 by Houghton Mifflin Harcourt. "Call my City Hall and you never got an answering machine. People trusted government because it heard them. Because they could talk to it. Because it kept its word."

Menino's health was often a concern, and he was admitted to the hospital several times while in office.

In 2003, he underwent surgery to remove a rare sarcoma on his back. The following year, his doctors confirmed he has been diagnosed with Crohn's disease, a type of inflammatory bowel disease.

He spent six weeks in the hospital in 2012 for a series of ailments, including a respiratory infection. While he was in the hospital, he suffered a compression fracture in his spine and was diagnosed with Type 2 diabetes.

In May 2013, he was back in the hospital for surgery for an enlarged prostate.

Menino left City Hall on his final day in office Jan. 6 to thunderous applause from city workers. Later, he tweeted: "Thank you Boston. It has been the honor and thrill of a lifetime to be your Mayor. Be as good to each other as you have been to me."

In March 2014, Menino revealed in an interview with The Boston Globe he was battling an advanced form of cancer that had spread to his liver and lymph nodes. Doctors said they were unable to pinpoint where the cancer originated.

In a statement announcing he was stopping treatment to devote himself to his loved ones, Menino said he was "hopeful and optimistic that one day the talented researchers, doctors and medical professionals in this city will find a cure for this awful disease."

Menino leaves behind his wife Angela, his children Susan and Thomas Jr., a Boston police officer, and six grandchildren.