Jami` at-Tirmidhi, Book 2, Hadith 262 (Tirmidhi 410)

Jabir narrated:

"We were with the Prophet (S) on a journey when it started to rain on us, so the Prophet (S) said: 'Whoever wishes, let him perform Salat in his place.'"