pull a rabbit out of a hat

Etymology
In reference to a popular conjuring trick.

Verb

 * 1)  To do something surprising and beneficial that is unexpected.