What a difference a half-century can make, especially when considering the impact of two landmark albums released only a few months apart 50 years ago. That they are even being considered in the same sentence today would’ve seemed preposterous in 1967. And the same is true now, except the albums have traded positions.

In the months leading up to the release of “Sgt. Pepper’s Lonely Hearts Club Band,” the Beatles knew that every word and sound they were recording would be scrutinized and likely celebrated, and they set their sights on the center of a youth culture that hung not just on their every song, but the way they dressed and styled their hair, what they said and how they said it.

The mainstream media were primed, as well. Publications such as Time magazine and the New York Times praised the grown-up sophistication of “Sgt. Pepper” when it was released June 1, 1967, hailing it as a “decisive moment in Western Civilization” and comparing its artistic reach to that of George Gershwin and T.S. Eliot. Years later, critic Langdon Winner amplified the hype in “The Rolling Stone Illustrated History of Rock ’n’ Roll” — “The closest Western Civilization has come to unity since the Congress of Vienna in 1815 was the week the ‘Sgt. Pepper’ album was released.”

The Velvet Underground, on the other hand, clearly knew that with its debut, “The Velvet Underground and Nico,” released March 12, 1967, it was making an album that failed almost every test of pop culture currency. Band members were seen as vile pornographers by those who superficially scanned and demeaned their risqué subject matter: drugs, decadence, “deviant” sex. Their record was banned from some stores, ignored by radio programmers and shunned by some publications that refused to run ads announcing its arrival.

The record sank off the charts the same week that “Sgt. Pepper” ushered in the “Summer of Love.” Years later, the Velvets’ John Cale shrugged when asked if the band was disappointed by the response. “There was a theory of stubbornness at work within the band,” he said. “We didn’t care what anyone thought.”

Now the “Summer of Love” feels like an artifact, and the Velvets’ vision of a landscape in which primitive rock ’n’ roll merged with literary and avant-garde aesthetics feels fresher than ever.

“Sgt. Pepper” was clearly a product of its era, a work that followed up two superior Beatles albums, “Rubber Soul” and, especially, “Revolver.” The studio experimentation that so dazzled contemporaries in 1967 was in full bloom a year earlier on “Revolver,” thanks to such visionary pieces of music as “Tomorrow Never Knows.” And the songwriting was extraordinary — the melancholy beauty of “Here, There and Everywhere,” the violent cool of “Taxman,” the jangling pop perfection of “And Your Bird Can Sing.”

While “Sgt. Pepper” offered the groundbreaking “A Day in the Life” and the psychedelic visions of “Lucy in the Sky With Diamonds,” much of the rest comes off as slight and overly clever and self-conscious. Songs such as the dance hall homage “When I’m 64” or the mash note to a meter maid, “Lovely Rita,” sound of a piece with the bubble gum of British contemporaries such as Herman’s Hermits or Gerry and the Pacemakers rather than of the group that released the double-sided single “Strawberry Fields”/“Penny Lane” only months earlier.

Expectations were ridiculously inflated for “Sgt. Pepper.” The album was crafted over 700 hours in the studio, a huge extravagance by the era’s standards (the Beatles spent less than 10 hours making their debut album). And it arrived after the Beatles had proclaimed that they would no longer tour to focus on recording. So suddenly the world’s biggest band had gone from a breakneck pace of recording three albums a year in between tours to a nine-month span of virtual silence in 1966-67. By the time “Sgt. Pepper” came out, the response was preordained: It could be nothing less than a masterpiece. That time has demonstrated that it fell short can be pinned on outsized expectations more than any failing by the Beatles, who made a pleasant if lightweight album when measured against their own immense standards.

Perhaps its main achievement was its inclusiveness — a warm, welcoming collection of show tunes that even your great-aunt could love. By making an album that would appeal to everyone, the Beatles disappeared inside the fanciful “Sgt. Pepper” costumes they wore on the album cover.

In contrast, “The Velvet Underground & Nico” was initially viewed as the work of a dicey-looking cult band cooked up by pop-art icon Andy Warhol, ostensibly the album’s “producer.”

Warhol’s role in the band was minimal. He helped foster some of the theatrical elements in the quartet’s “Exploding Plastic Inevitable” shows, designed the album’s famed banana cover and brought in model-turned-vocalist Nico. Primarily, he provided a kind of insulation from corporate record-label interference. He enabled Lou Reed, John Cale, Sterling Morrison and Maureen Tucker to chase their singular vision, a true melding of high-art ambition and raw rock ’n’ roll, flavored with avant-garde, classical and world music elements — without the recording budget of the Beatles.

The Velvets’ songs provoked outrage. “Heroin” chronicled a junkie’s habit in novelistic detail with an ebb-and-flow arrangement built on Tucker’s tribal drumming, Cale’s scraping viola and Reed’s deadpan vocal. It offered no judgments or pronouncements, only a point of view from a voice not often heard in popular music. Similarly, there were investigations of the drug trade rendered almost as dark comedy (“Waiting for the Man”) over a primitive rock pulse that Bo Diddley might’ve admired; a mystical, droning plunge into the world of sadomasochism as depicted in the work of Austrian novelist Leopold von Sacher-Masoch (“Venus in Furs”), and the screeching subway car violence of “European Son,” Reed’s twisted tribute to his literary mentor, the late author Delmore Schwartz. And yet there was the icy tenderness of “I’ll Be Your Mirror” and “All Tomorrow’s Parties,” and the deceptive music box twinkle of “Sunday Morning” and its encroaching paranoia.

These were not particularly comforting songs, nor were they intended to be. The Velvets saw the ’60s as a grand marketing scam, and they were an opposition party of four, wary of youth culture movements and “flower power” sloganeering. Over time, their music — abrasive yet beautiful, poetic yet punishing — felt strangely accessible to kids picking up their guitars around the world.

It would resonate decades later in the music of everyone from the Sex Pistols and the Talking Heads to R.E.M. and the Strokes. As producer Brian Eno once famously said, even though the Velvets’ debut sold only 30,000 copies in its early years, “everyone who bought one of those 30,000 copies started a band.” Indeed, each of its songs now sounds like a jumping-off point for entire subgenres of punk, post-punk, indie and alternative rock.

Yet the Velvets’ mission was a solitary one in 1967, a time when almost every other band aspiring to break into the pop charts wanted to be the Beatles. The Velvets believed in rock ’n’ roll, yet wanted to push it forward on their own uncompromising and widely derided terms. Reed saw it as music that could be as sustaining and artistically ambitious as a great novel or movie. “The Velvet Underground and Nico” saw the world with a ruthless clarity that went beyond mere teen-dream escapism. Next to it, “Sgt. Pepper” — despite its kaleidoscopic sound and studio achievements — sounds almost quaint.