Gov. Cuomo railed against the gun violence plaguing the city Sunday as seven people were fatally shot in fewer than 24 hours — and Mayor de Blasio insisted the NYPD had everything under control.

The city’s weekly murder rate more than quadrupled — from two to at least 11 — compared with the same period last year.

Among those killed Sunday was a 76-year-old Brooklyn man who got caught in the middle of a shooting in a housing-project courtyard, sources told The Post.

“The madness has to stop and has to stop in Washington,” Cuomo said during a breakfast at the Harlem Tavern before the African American Day Parade.

“The guns aren’t coming from the state anymore . . . They are coming from down South, and they’re bringing the guns in.”

But while de Blasio called it “a tough night,’’ he added it was “the safest summer in 20 years.”

“We don’t take any crime lightly. But I want to emphasize that NYPD is doing a better and better job getting at these crimes,’’ the mayor told reporters after marching in the parade.

“It appears to be criminals against criminals,” he said, perhaps unaware that Herbert Brown, the elderly man fatally shot in the Ingersoll Houses courtyard early Sunday, was believed to have been a bystander.

Brooklyn activist Tony Herbert, standing near the Ingersoll Houses, retorted, “The mayor needs to pull his head out of his a- - and help these people.”

Brown was struck in the abdomen while standing near two other men who also were killed. They were identified as Lacount Simmons, 39, and Calvin Clinkscales, 43. Both were shot in the head.

The weekend bloodshed began at about 5:40 p.m. Saturday in Brooklyn, when Julio Yasser, 36, was fatally shot in front of a dry-cleaning business.

About two hours later in The Bronx, Nestor Suazo, 25, was slain. At 10:40 p.m. in East Harlem, Kevin Brye, 34, was shot in the head near his home. David Hooks, 24, was found shot dead on Briggs Avenue in The Bronx at around 2:45 p.m. Sunday.

Monday, meanwhile, started off with more violence as a man was fatally shot at around 1:30 a.m. near East 189th Street and Beaumont Avenue in the Bronx.

Additional reporting by Dana Sauchelli and Kevin Sheehan