Access to novel imidazo[1,5-a]pyrazine scaffolds by the combined use of a three-component reaction and a base-assisted intramolecular cyclization.