UPDATED at 1 p.m. to reflect GoldieBlox's disclosure of terms of the legal settlement. 

GoldieBlox--a young startup that sells toys intended to turn young girls on to engineering--gained a great deal of media attention last year when it used the Beastie Boys' single "Girls" in a video advertisement that went viral. Soon after, the Oakland, California-based company got even more attention for its legal battle with the hip hop group over its use of the song. 

Now that long battle is over. Yesterday, the Beastie Boys and GoldieBlox settled their lawsuits, according to paperwork originally obtained by Re/code. According to a GoldieBlox spokesperson, the settlement entails GoldieBlox issuing an apology and paying a percentage of its revenues to one or more charities--which the Beastie Boys will choose--that support science, technology, engineering, and math education for girls. 

At the end of last year, GoldieBlox preemptively filed a lawsuit against the Beastie Boys in which the company argued that its ad was a fair use of the song because it was a parody, not an advertisement. The hip hop group countersued, claiming that it was, in fact, an advertisement, and an infringement on intellectual property. 

The ad in question has since been removed from YouTube, replaced with a version that features different music. This is not the first time the Beastie Boys have made it a point to prevent commercial use of their music. 

Although legal problems are never easy, the fight for the right to use the song did boost awareness of GoldieBlox's brand and helped the startup toward its goal of disrupting the pink aisle. Earlier this year, the toy startup also won a Super Bowl commercial through Intuit's Small Business, Big Game competition.