The Companions constitute the first pure and blessed channel through which the Qur'an and the Sunna were transmitted to later generations. God is the All-Trustworthy and Inspirer of Trust.
The Qur'an describes Archangel Gabriel as trustworthy and as one, obeyed and having power (81:20–21). Prophet Muhammad was renowned for his trustworthiness. The Qur'an was entrusted to the Companions, who memorized and recorded it so that it could be transmitted. This blessed community, which was praised in the Torah and Gospel, was the living embodiment of almost all laudable virtues and sought nothing but the good pleasure of God. In addition to the Qur'an, they absorbed the Sunna, lived disciplined lives in strict accordance with the Prophet's example, and exerted all their efforts to both represent and transmit it with complete accuracy.
According to Ibn Hajar al-Asqalani, scholars define a Companion as "a believer who saw and heard the Messenger at least once and died as a believer."  Even though some scholars have stipulated that a "potential" Companion should have lived in the Messenger's company for one or even two years, most scholars say it is enough to have been present in his radiant atmosphere long enough to derive some benefit from it.
Of course, the Companions are not equal to each other in rank or greatness. Some believed in the Messenger at the very outset of his mission, and conversions continued until his death. The Qur'an grades them according to precedence in belief and to conversion before and after the conquest of Makka (9:100; 57:10). The same gradation also was made by the Messenger. For example, he reproached Khalid for offending 'Ammar, saying: "Don't bother my Companions!"  He also frowned at 'Umar when he annoyed Abu Bakr, and asked: "Why don't you leave my Companions to me? Abu Bakr believed in me when all of you denied me." Abu Bakr knelt down and explained: "O Messenger of God, it was my fault!" 
Hakim al-Nisaburi divided them into twelve ranks, and most scholars accept his ranking:
•The four Rightly Guided Caliphs (Abu Bakr, 'Umar, 'Uthman, and 'Ali), and the rest of the ten who were promised Paradise while still alive (Zubayr ibn al-'Awwam, Abu 'Ubayda ibn al-Jarrah, 'Abd al-Rahman ibn 'Awf, Talha ibn 'Ubaydullah, Sa'd ibn Abi Waqqas, and Sa'id ibn Zayd).
•Those who believed prior to 'Umar's conversion and met secretly in Arqam's house to listen to the Messenger.
•Those who migrated to Abyssinia.
•The Helpers (Ansar) who swore their allegiance to the Messsenger at al-'Aqaba.
•The Helpers who swore their allegiance at al-'Aqaba the following year.
•The Emigrants who joined the Messenger during the hijra before his arrival in Madina from Quba, where he stayed for a short while.
•The Companions who fought at Badr.
•Those who emigrated to Madina between the Battle of Badr and the Treaty of Hudaybiya.
•The Companions who swore allegiance under a tree during the expedition of Hudaybiya.
•Those who converted and emigrated to Madina after the Treaty of Hudaybiya.
•Those who became Muslims after the conquest of Makka.
•Children who saw the Messenger any time or any place after the conquest of Makka.
Muslim scholars of the highest rank, whose minds are enlightened by scientific knowledge and whose souls are illumined by religious knowledge and practice, agree that Prophets are the greatest members of humanity. Immediately after them come the Companions of the Last Prophet, who is the greatest Prophet.
Although some Companions may have the same rank as previous Prophets in a particular virtue, no one can equal a Prophet in general terms. Likewise, some of the greatest saints or scholars can compete with the Companions or even excel some of them in particular virtues, but even a Companion of the lowest rank, such as Wahshi (the slayer of Hamza), is still greater, in general terms, than all who come after the Companions. All Muslim scholars, whether Traditionists, theologians, or saints, agree upon this.
 Ibn Hajar, al-Isaba, 1:7.
 Ibn Athir, Usd al-Ghaba, 4:132.
 Bukhari, "Tafsir," 7/3.