SAPO membranes and methods for their preparation and use are described. The SAPO membranes are prepared by contacting at least one surface of a porous membrane support with an aged synthesis gel. A layer of SAPO crystals is formed on at least one surface of the support. SAPO crystals may also form in the pores of the support. SAPO-34 membranes of the invention can have improved selectivity for certain gas mixtures, including mixtures of carbon dioxide and methane.