Gunshots and sirens filled the streets of Chicago during the weekend. Between Friday evening and Sunday night, 63 people were shot in separate incidents, ABC 7 reported. Ten were killed in the attacks, Chicago police said. In one 2½-hour stretch, 25 people were hit in five different shootings.

The grim news added to the city’s image as one of the country’s most troubled metropolitan areas, reigniting debates online about how to stop the violence. As the smoke cleared, an unexpected voice jumped into the debate.

Taking a breather from his dizzying gig as President Trump’s attorney and cable news surrogate, Rudolph W. Giuliani addressed the shootings in tweets. The former New York mayor threw his support behind Garry McCarthy, the former Chicago Police superintendent who is running to unseat Mayor Rahm Emanuel, whose name Giuliani spelled wrong. (He also initially spelled McCarthy’s first name wrong, “Jerry.”) Giuliani told his followers that McCarthy — who served as a New York Police Department official while Giuliani was in office, when crime rapidly dropped in New York — was the one who could clean up Chicago’s streets. Giuliani cited McCarthy’s work with CompStat, the data-driven tactic championed by the NYPD in the 90s.

“Chicago murders are direct result of one party Democratic rule for decades. Policing genius Jerry McCarthy can do for Chicago what I did for NYC,” Giuliani said. “He was one of the architects of Compstat. Slashed homicides over 70 percent. Tens of thousands of lives saved.”

He ended his statement with a Trumpian Twitter flourish.

“MAKE CHICAGO SAFE AGAIN! He can do a lot better than Mayor Emmanuel who is fiddling while Chicago burns.”

Giuliani wasn’t just plugging a former colleague; he was engaging in a longtime Republican political tradition. For more than 50 years, GOP lawmakers have fashioned tragic urban violence into a political weapon to turn on Democrats. It’s a strategy that’s paid off considerably for Republican candidates, from Richard M. Nixon to Trump to Giuliani himself.

Nixon was among the first to significantly leverage crime on the campaign trail. According to Politico, the nation’s crime rate exploded between 1960 and 1970 by 176 percent. In his 1968 bid for the White House, the former vice president pitched his campaign to the “Silent Majority” of Americans, the “non-shouters, the non-demonstrators, that are not racists or sick, that are not guilty of crime that plagues the land,” as he termed them.

The law-and-order rhetoric became the centerpiece of the campaign. As the Wall Street Journal noted at the time, Nixon “tells a whistle-stop rally in Deshler, Ohio, that in the 45 minutes since his train left Lima, one murder, two rapes and 45 major crimes of violence had occurred in this country” while blasting his opponent Hubert Humphrey as a defender of “the policies under which we have seen crime rise to this point.”

Ronald Reagan picked up the same lesson. Beginning with his 1966 run for California governor, Reagan preached a “tough on crime” stance in the face of growing social unrest. In his 1980 presidential campaign, he amplified the same message. He won, Walker Newell argued in a 2013 article in the Berkeley Journal of African-American Law & Policy, “in substantial part by successfully manipulating racial divides in voter preference.”

“Backing up his belief in an expanded federal role in crime control, Reagan presided over significant expansions of the federal role in criminal justice, especially in the area of drug policy and enforcement,” Newell wrote.

When Giuliani ran against New York Mayor David Dinkins in 1993, he also tapped into anxiety over the city’s high crime rate. The former prosecutor’s form of “law and order” campaigning specifically centered on the “Broken Windows” theory, the idea that an aggressive crackdown on minor crimes will lead to an overall reduction in broken laws.

“It’s the street tax paid to drunks and panhandlers,” Giuliani said during his campaign, outlining the crimes he wanted to target as mayor. “It’s the squeegee men shaking down the motorist waiting at a light. It’s the trash storms, the swirling mass of garbage left by peddlers and panhandlers, and open-air drug bazaars on unclean streets.”

Once in the mayor’s office, Giuliani combined the “Broken Windows” theory with CompStat, a statistic-heavy approach to tracking crime. It was during this era the mayor worked closely with McCarthy, who rose to the NYPD’s deputy commissioner of operations. (Although crime did drop dramatically in Giuliani’s tenure, statistics show New York’s numbers had begun to fall during the Dinkins administration, according to PolitiFact.)

McCarthy’s time in New York paved the way for his job as the top cop in Chicago. He eventually lost that job in December 2015 after the fallout from the Laquan McDonald shooting and other bad headlines for the department.

The rising homicide rate in Chicago following his ouster was the main driver behind his decision to run against his former boss Emanuel as a “conservative Democrat,” as he told the Chicago Tribune.