In the Samyutta-nikāya Mahāvagga Nīvārana Sutta (19/501-502/136/137), Lord Buddha taught:

Monks, the Five Hindrances create darkness, causing lack of Vision (Chakkhu), Transcendental Knowledge (Ñāna) and Wisdom (Vijjā). They do not lead to Nirvana, but to despair. What are the Five Hindrances? They are Sensual Desire (Kāma-chanda), Ill Will (Byāpāda), Drowsiness (Thīna-middha), Restlessness (Uddhacca-kukkucca), and Doubt (Vicikicchā). They create darkness, causing lack of Vision, Transcendental Knowledge and Wisdom. They do not lead to Nirvana, but to despair.

Monks, the Seven Factors of Enlightenment (Bojjhanga) generate Vision, develop Transcendental Knowledge and Wisdom. They do not lead to despair, but to Nirvana. What are the Seven Bojjhanga? They are Sati, Dhamma-vicaya, Viriya, Piti, Passaddhi, Samādhi and Upekkhā. They generate Vision, develop Transcendental Knowledge and Wisdom. They do not lead to despair, but to Nirvana.

Recognizing that the Five Hindrances spread darkness and the Seven Factors of Enlightenment (Sambojjhanga) generate vision, Lord Buddha taught the practices for developing the Seven Factors of Enlightenment. The Tipitaka Samyutta-nikāya Mahāvagga and its commentary present and explain these practices.