Grokster Ltd., which came out on the losing end of a Supreme Court decision, has agreed to shut down its file-swapping service and pay $50 million to settle music and movie piracy claims.

The surprise settlement announced Monday permanently bans Grokster from participating, directly or indirectly, in the theft of copyrighted files and requires the company to stop giving away its software.