Gordon Lightfoot, the Canadian folk singer who died on Monday at 84, had one hit in particular that famously defied Top 40 logic.

“The Wreck of the Edmund Fitzgerald,” his 1976 folk ballad, was unusual partly because, at more than six minutes long, it was about twice as long as most pop hits. It also retold a real-life tragedy — the 1975 sinking on Lake Superior of a freighter with 29 crewmen aboard — with meticulous attention to detail.

“It’s a documentarian’s song, when you think about it,” said Eric Greenberg, a longtime friend of the singer who interviewed Mr. Lightfoot as a student journalist in the late 1970s and later co-wrote a song with him.

The plotline of a typical Top 40 hit usually consists of “boy meets girl, boy breaks up with girl, or come back, or you left me, or whatever,” Mr. Greenberg said, speaking by phone from New York City. “Not a five-, six-, seven-minute story — a factual story, in Gordon’s case, painstakingly checked to make sure that all the facts are right.”

Here’s the true story that inspired “The Wreck of the Edmund Fitzgerald,” and a look at the song that kept its memory alive.

The Edmund Fitzgerald was a 729-foot ore carrier and one of the largest freighters on the Great Lakes when it left Superior, Wis., on Nov. 9, 1975, carrying iron pellets bound for Detroit.

The next day, the ship was caught in a storm with winds that averaged 60 to 65 miles an hour. Its captain reported 20- to 25-foot waves washing over the decks and water pouring in below deck through two broken air vents.

That night, the Edmund Fitzgerald sank near the coasts of Ontario and Michigan, in water that was only about 50 degrees. A nearby ship reported seeing its lights disappear in the driving snow.

The Coast Guard later found lifeboats, life rings and other debris from the ship. But the lifeboats were self-inflatable, so their discovery did not necessarily indicate that they had been used. None of the 29 crew members survived.

The morning after the Fitzgerald went down, the rector of Mariners’ Church of Detroit tolled its bell 29 times, once for each man lost. An Associated Press reporter knocked on the church’s door, interviewed the rector and filed an account that was published in newspapers.

Mr. Lightfoot read the article. Soon afterward, he started singing a song about the wreck during a previously scheduled recording session. His band joined in, and the first version of the song that they recorded was later released, according to “Gordon Lightfoot: If You Could Read My Mind,” a 2020 documentary.

There was no expectation that the song would become a hit single, because its length made it too long for airplay on the radio. But it would spend 21 weeks on the Billboard charts and peak at No. 2, one notch behind Mr. Lightfoot’s only No. 1 hit, “Sundown.” It also turned the tale of the sinking into a modern legend.

Yet unlike songs that use a real-life story as the basis for embellishment, Mr. Lightfoot’s ballad hewed precisely to the real-life details. The weight of the ore, for example — “26,000 tons more than the Edmund Fitzgerald weighed empty” — was accurate. So was the number of times that the church bell chimed in Detroit.

Decades later, Mr. Lightfoot changed the lyrics slightly after investigations into the accident revealed that waves, not crew error, had led to the shipwreck. In the new lyrics, he sang that it got dark at 7 that November night on Lake Superior — not that a main hatchway caved in.

“That’s the kind of meticulous, looking-for-the-truth kind of guy that he was,” Mr. Greenberg said.

“The Wreck of the Edmund Fitzgerald,” like its creator, endured as a Canadian classic long after slipping off the Top 40 charts. The bluegrass guitarist Tony Rice (who also released an entire album of Lightfoot cover songs) and the rock bands Rheostatics and the Dandy Warhols were among those who sang covers over the years.

“The melodies are so powerful and he’s such a good storyteller and such a beautiful lyricist,” the Canadian singer-songwriter Sarah McLachlan said in the 2020 documentary. “And the combination of those things just really makes for a great song.”

Mr. Lightfoot remained proud of it for decades, and he kept newspaper clippings and items given to him by the crew members’ surviving families in his home, Mr. Greenberg said.

The song’s success had one downside: It turned the wreck, which lies in Canadian territory at a depth of about 500 feet, into a trophy for divers, upsetting the lost sailors’ families. In 2006, the government of Ontario adopted a law protecting the site.