The latest dispute began this fall when the clothing company H&M was looking for a place to hold a fashion shoot and found what seemed like a perfectly gritty — but not actually dangerous — location: a graffitied handball court in the William Sheridan Playground in the heart of one of Brooklyn’s hipster meccas.

On Halloween, a production firm that H&M had hired wrote a letter to the city’s parks department asking if it needed to pay royalties to use the graffiti in an advertising video. That same day, a department official wrote back, saying that the city had not sanctioned the mural (“This graffiti should NOT have been on the handball wall”) and admitting she had no idea who painted it.

Taking this as tacit permission, H&M shot footage of a model in its new line of apparel using the graffiti as a backdrop. And this being the internet age, the artist, Jason Williams, saw it within months.

In early January, Mr. Williams, who lives in California and uses the tagging name Revok, had his lawyer, Jeff Gluck, send H&M a cease-and-desist letter. The letter claimed that the company had availed itself of Mr. Williams’s work without approval and threatened legal action in the absence of “an amicable settlement.”

There was no settlement — amicable or otherwise — and on Jan. 26, H&M’s lawyers wrote to Mr. Gluck explaining they had done due diligence and now felt that the mural was not only “unauthorized,” but also “constituted vandalism.” H&M, the lawyers said, no longer needed Mr. Williams’s permission, seeing, as they put it, that “his graffiti was created through criminal conduct.” Last Friday, the company filed suit asking a judge to declare that Mr. Williams had no claims on his own piece of art and to let it use the mural free of charge.