A study of an unusual effect of the size of the ring fused to 2H-pyran-2-ones on the exo/endo selectivity of a thermal double cycloaddition of N-substituted maleimides or maleic anhydride yielding bicyclo[2.2.2]octene derivatives is presented. With subtle variations of starting compounds and reaction conditions exclusively exo,exo or exo,endo products can be prepared.