The 120th sutta of the Majjhima Nikāya.
A monk who possesses the five sankhāras ("plastic forces") of faith, virtue, learning, munificence and wisdom, if he cultivate and develop them, can be reborn in any condition or world he may desire; he can even, thereby, win Nibbāna (M.iii.99ff).
The sutta contains a long list of Deva-worlds and Brahma worlds.