Exegesis on the Quran say this verses were revealed concerning the battle of Uhud (Tafsir Ibn Kathir).
Quran 3:146 And how many a prophet [fought and] with him fought many religious scholars. But they never lost assurance due to what afflicted them in the cause of God, nor did they weaken or submit. And Allah loves the steadfast.
The verse tells us that the Prophet (p) and his Companions fought against Quraysh at the battle of Uhud. What the Muslims were afflicted with i.e., suffering during this battle they never weakened, or submitted to the persecutors demands by handing over their lives to be slain. Rather they fought as brave men against the tyrants. Tafsir Ibn Kathir sheds more light on this verse:
“Allah then comforts the believers because of what they suffered in Uhud, (And many a Prophet fought and along with him many Ribbiyyun.) It was said that this Ayah means that many Prophets and their companions were killed in earlier times, as is the view chosen by Ibn Jarir. It was also said that the Ayah means that many Prophets witnessed their companions’ death before their eyes.
However, Ibn Ishaq mentioned another explanation in his Sirah, saying that this Ayah means, “Many a Prophet was killed, and he had many companions whose resolve did not weaken after their Prophet died, and they did not become feeble in the face of the enemy. What they suffered in Jihad in Allah’s cause and for the sake of their religion did not make them lose heart.
This is patience, (and Allah loves the patient.)” As-Suhayli agreed with this explanation and defended it vigorously. This view is supported by Allah saying; (And along with him many Ribbiyyun). In his book about the battles, Al-Amawi mentioned only this explanation for the Ayah. Sufyan Ath-Thawri reported that, Ibn Mas`ud said that, (many Ribbiyyun) means, thousands. Ibn `Abbas, Mujahid, Sa`id bin Jubayr, `Ikrimah, Al-Hasan, Qatadah, As-Suddi, Ar-Rabi` and `Ata’ Al-Khurasani said that the word Ribbiyyun means, `large bands’.
`Abdur-Razzaq narrated that Ma`mmar said that Al-Hasan said that, (many Ribbiyyun) means, many scholars. He also said that it means patient and pious scholars. (But they never lost heart for that which befell them in Allah’s way, nor did they weaken nor degrade themselves.) Qatadah and Ar-Rabi` bin Anas said that, (nor did they weaken), means, after their Prophet was killed. (nor degrade themselves), by reverting from the true guidance and religion.
Rather, they fought on the path that Allah’s Prophet fought on until they met Allah. Ibn `Abbas said that, (nor degrade themselves) means, nor became humiliated, while As-Suddi and Ibn Zayd said that it means, they did not give in to the enemy.” 
 Tafsir Ibn Kathir http://www.qtafsir.com/index.php?option=com_content&task=view&id=490&Itemid=46