Composer Hans Zimmer

Composer Hans Zimmer attends the "Interstellar" New York Premiere at AMC Lincoln Square Theater on November 3, 2014 in New York City. 

Jim Spellman/WireImage

Hans Zimmer has received more than just a win in a copyright infringement case -- he also received an apology from a fellow composer who now says he mistakenly sued the Oscar-winner over the music to 12 Years a Slave.

Richard Friedman sued Zimmer for copyright infringement in January 2015 over the film's music, but he now says he never should have brought the case. Friedman wrote a letter to Zimmer saying he deeply regrets filing the lawsuit.

"I sincerely apologize to you for bringing the lawsuit and for the time and expense you incurred in its defense," said Friedman, who writes music for film and television and movie trailers.

'Blurred Lines' Creators Urge Appeals Court to Reverse Marvin Gaye Family's Trial Victory

He wrote that he sued Zimmer based on the mistaken conclusion of a music expert. His case was dismissed from a federal court in Los Angeles on Wednesday.

Zimmer has been nominated for 10 Academy Awards and won an Oscar for his score for The Lion King. His score for 12 Years a Slave was not nominated for an Oscar, although the film won best picture in 2014.

Zimmer says he is gratified by the outcome, and referenced other high-profile copyright fights in a statement.

"I hope this case's successful conclusion will persuade other artists who face similar claims that justice can be achieved," Zimmer wrote. "I also hope that this dismissal will discourage other plaintiffs who may be motivated by recent high-profile music copyright lawsuits from filing meritless infringement claims."

On Wednesday, attorneys for Pharrell Williams and Robin Thicke filed their opening brief appealing an infringement verdict against their 2013 hit "Blurred Lines." The verdict awarded more than $5 million to Marvin Gaye's family, and gave them a 50 percent right to ongoing royalties from the song.

Since then, two other high-profile copyright trials have been heard in Los Angeles — one against Jay Z and another against the band Led Zeppelin over its song "Stairway to Heaven." Both cases were decided in favor of the artists.