WASHINGTON — The Trump administration is coming to the defense of Led Zeppelin in a copyright dispute over the opening passage from one of rock's best-known anthems, "Stairway to Heaven," a melody and chord sequence that nearly every aspiring guitarist tries to master.

The Justice Department filed a friend of court brief late Thursday supporting Led Zeppelin against a claim that it stole the musical passage from an earlier recording, "Taurus" by Spirit. The legal battle of the bands has played out in federal courts in California for the past five years.

Trustees for the songwriter of "Taurus," Randy Wolfe — who called himself Randy California and has since died — accuse Led Zeppelin of violating his copyright by appropriating the "distinct plucked guitar line and melody." The case went to a jury, which ruled for Led Zeppelin in 2016.

At the trial, the jury heard from a member of Spirit, Led Zeppelin musicians Jimmy Page and Robert Plant, and musical experts — but jurors never heard the actual recording of either song in court. The judge ruled that because "Taurus" was written in 1967, it fell under an older version of federal copyright law, which protected only the sheet music for the song, not the sound recording.

A three-judge panel of the Ninth Circuit Court of Appeals ordered the case sent back for another trial, ruling that the jury should have heard the recordings to demonstrate that Led Zeppelin had access to "Taurus." But in June, the full Ninth Circuit said it would hear the appeal again.

In its brief filed Thursday, the Justice Department said the trial judge got it right when he ruled that the only work subject to copyright protection was the sheet music, because the song was written before Congress changed the law in 1972, which gave protection to sound recordings.

The similar-sounding qualities of the two passages, consisting of an A-minor chord and descending bass line in a chromatic scale, deserve protection only if they are virtually identical, the government said. And under that test, the brief said, Led Zeppelin should prevail.

A victory for Spirit would re-write a chapter of music history, involving bragging rights to one of rock's most famous guitar passages. "Stairway to Heaven" is number 31 on Rolling Stone's list of the 500 greatest songs of all time.

The appeals court will hear the case in September.