Can anyone identify this book?

Vague recollection of a book I glanced at in a used bookstore, and have regretted not buying:

Science and magic are at war. Science is losing. As a last ditch effort, the scientists manage to smuggle a bug into a wizard’s conclave and eavesdrop as the wizards discuss their magic. Using this information, the scientists repeat the magicians spells, codify their findings, and are able to organize magic into a rational system, verifiable by expirement. Magic therefore becomes scientific, and science wins by default.

Ring any bells?

Interesting! Was it a full novel, or like a short story in an anthology?

Sounds like something Larry Niven might have written.

Your description reminds me of Randall Garrett’s “Lord Darcy” stories, set in an alternate universe in which magic has become a science. There’s some info and a list of the stories here.

No, it is definitely not anything from the Lord Darcy series. Those are all mysteries set in a universe where the laws of magic are codified. No war with science involved at all.

Might the ‘bug’ have been hidden in the eye of a unicorn?

If so, that would be Siege of Wonder by Mark S. Geston, published by DAW in 1977…

That’s It! Amazing. Thanks!

Wow. Never thought anyone would know that…