In the beginning, they were the anti-Beatles.

The Fab Four were the cute boys next door, the mop tops you could take home to mom.

The Rolling Stones — who bring their No Filter tour to Lincoln Financial Field on Tuesday, in a date rescheduled from June due to Mick Jagger’s heart surgery this spring — were marketed as their opposites.

Mad, bad, and dangerous to know, they were the insolent rebels of the British Invasion. They brooded, and played the blues. No matter how they tried (and tried), they could get no satisfaction.

In the 2012 documentary Crossfire Hurricane, Keith Richards explained: “The Beatles got the white hats. What’s left? The black hat.”

Pop culture may have long since lost its capacity to shock, but back then the Stones were regarded as a genuine threat to polite society, especially in their native land.

As journalist Nik Cohn put it in 1969, “They were mean and nasty, full-blooded, very tasty, and they beat out the toughest, crudest, most offensive noise any English band ever made.”

At an infamous 1967 drug bust at Richards’ house outside London, police were aghast to find Marianne Faithfull wearing nothing but a rug. At the trial, Richards responded to a scolding prosecutor with youth-culture defiance: “We are not old men. We are not worried about petty morals.”

That lack of concern with acceptable behavior — giving absolutely no blanks, in today’s parlance — remained a Stones staple, long after the licentiousness of the era faded.

That’s particularly true when it comes to Richards, who has for decades played the image of the hard-drinking heroin-shooting rock-and-roll survivor, seemingly impervious to the laws of nature.

But of course, the Stones now are old men, and have been, it seems like, for practically forever.

That’s because they were original youth-culture avatars of the “don’t trust anyone over 30” generation who as they’ve aged have kept pushing the limit on just how ancient you can be while continuing to do what was once considered to be childish things.

They got to be that way because unlike live-fast ‘60s contemporaries Jimi Hendrix and Janis Joplin, they didn’t die young. (Well, Brian Jones, who stood out front with Jagger and Richards in the early days, did, but that was back in 1969, half a century ago.)

And unlike the Beatles, who called it quits before they ever put a foot wrong, the Stones have — amazingly — never actually broken up. There’s never needed to be a reunion tour, because although the Jagger-Richards relationship has often been antagonistic — like many good creative partnerships — it’s never completely gone off the rails.

So after the ‘60s came to a close — unofficially, at a Rolling Stones concert at Altamont Speedway in which a member of the Hells Angels stabbed a man to death in a scene captured on film in the Maysles Brothers documentary Gimme Shelter — the Stones carried on.

And prospered. For the first decade they did so creatively. The four-album run beginning with Beggars Banquet in 1968 through Let It Bleed in 1969, Sticky Fingers in 1971, and Exile On Main Street in 1972, all with producer Jimmy Miller, stands with the most impressive winning streaks in the history of popular music, up there with Stevie Wonder in the ‘70s and not many others.

Songs from that series of dark, murky masterpieces — like “Midnight Rambler,” “Honky Tonky Women,” and “You Can’t Always Get What You Want” — are making up about half of the 20-song-or-so slightly fluid set list the band has been playing on this tour.

And though the Stones spent the mid-'70s being less than inspired, they bounced back with one of their greatest records, Some Girls, in 1978. One deliciously dirty riff on that thoroughly sleazy album is “Respectable,” in which Jagger — who was knighted in 2003 — snidely mocked those who inhabit elevated social strata, including the Rolling Stones: “We’re now respected in society, we ain’t worried about the things that we used to be.”

They still had some good music left in them — Tattoo You in 1981, Dirty Work in 1986, and yes I will defend the underrated 2016 album of blues covers, Blue & Lonesome — but by the early 1980s the Stones started to become known as a business entity as much as a band.

They played JFK Stadium in South Philly in 1978 and again in 1981, and filled Veterans Stadium across the street several times through the early ’00s.

A moneymaking machine, the Stones pioneered tour partnerships — the Tattoo You tour was sponsored by Jovan perfume — and did a deal with Microsoft to use “Start Me Up” to launch Windows 95.

(The No Filter tour is sponsored by a nonprofit, but one well-suited to the Stones’ baby-boomer audience: the financial planning firm Alliance for Lifetime Income.)

The Stones don’t need the financial advice, and still never talk about retiring, though people have been wondering whether it was appropriate for Jagger to keep prancing around the stage at his age for decades now.

In 1983, Pete Townshend wrote an essay agonizing over what it meant for Mick Jagger to be turning 40.

Back in the 1990s, when they were merely in their 50s, they were often mocked for their decrepitude as “the Strolling Bones,” a macabre entity long past its sell-by date.

In retrospect, the Stones paved their way for generational peers. Concert arenas across the land are filled with septuagenarians: Jeff Lynne’s ELO was at the Wells Fargo Center last weekend, Queen (with the young singer Adam Lambert) is due on Aug. 3 and Elton John’s farewell tour circles back on Nov. 8 and 9.

Meanwhile, the Stones roll on. Years ago, they started getting mocked because their average age was inching close to that of the U.S. Supreme Court. But in 2019 it’s no contest: Drummer Charlie Watts (78), guitarist Ron Wood (72), and Jagger and Richards (both 75) average out at nine years older than the current Supreme Court. (The number would be lower if bassist Darryl Jones, who replaced Bill Wyman in 1993, were included. But he’s never been made an official Stone.)

But if it’s easy to tease the Stones about their senior-citizen status, their longevity also demands respect. No, they don’t write and record new songs — or at least, they don’t release them. And they will never again be able to convey the sense of menace and danger that they did in their early “Paint It, Black” and “19th Nervous Breakdown” days.

But I suspect that those who get themselves down to the Linc to hear them on Tuesday will find themselves in the presence of a vital-sounding band whose members are still intuitively attuned to one another and capable of raising a ruckus on some of the world’s greatest rock-and-roll songs, that they’ve lived with for decades.

This time, though, it’s going to feel different. As they’ve kept coming back — last playing here on the 50 & Counting tour in 2013 — it’s been easy to take the Stones for granted, probably particularly for baby-boomer peers who have always had the band in their life.

But since this spring when Jagger underwent his heart-valve operation — which seems to be an unqualified success — the comforting sense of musical immortality has vanished.

It’s his goblin-like, possibly invincible partner who’s pictured in a popular meme: “We need to start worrying about what kind of world we’re going to leave Keith Richards.”

But the news of Jagger’s condition — despite his amazing aerobic conditioning — put the fear of no more “Jumping Jack Flash” into Stones fans’ minds, and it will turn the Linc show into a more urgent occasion.

It’s a reminder that despite the words of Philadelphia soul-music songwriter Jerry Ragavoy — originally sung by Irma Thomas before they were by Jagger — that time isn’t ultimately on anyone’s side. And that this Tuesday night in South Philly with the Rolling Stones really could be the last time.