Davenport Lyons lawyers went undercover at a university freshers' fair to force the Tory Party to withdraw the Young Conservatives' logo "cfuk".
The Young Conservatives created the logo on merchandise which was given out to students around the UK.
But clothing retailer French Connection, which owns the trade mark "fcuk", fired off a writ alleging breach of copyright last week.
Davenport Lyons sent three trainees incognito to freshers' fairs. They had to join the Young Conservatives to receive the offending goods.
French Connection was due to seek an injunction against the use of the logo last Friday. But at the eleventh hour the Conservative Party gave its undertaking to stop using the logo. It is now looking to settle out of court.
Davenport Lyons partner in charge of IP Stephen Digby says: "This is a great result."