The Prophet(PBUH) organized the Muslims into cavalry units called Saraya
The cavalry units undertook four main tasks. Primarily they were to protect the outskirts of Madinah and to gather intelligence about any suspicious activities. Secondly, they worked to intercept enemy trade caravans.
Thirdly, it was the responsibility of these cavalry units to make covenants with other tribes outside Madinah. The Prophet saw the need to develop good relationships with these tribes so that they would not ally with the Quraysh. Lastly, the units were entrusted with the task of spreading the message of Islam throughout Arabia.