The Background of Ayat-ul-Shahadah
Imam al-Baghawi reports that two leading Jewish scholars came to Madinah from Syria. With the township of Madinah before them, they started talking to each other about the looks of the place which matched the prophecy in Torah that the last of the prophets would be living here. Later, they came to know that someone very pious lives here and whom people refer to as the prophet. They went to see the Holy Prophet (saw). Their very first sight of him reminded them of all attributes which Torah had predicted he would have. They presented themselves before him and said: "You are Muhammad?" He said: "Yes." Again, they said: "You are Ahmad?" He said: "Yes, I am Muhammad, and Ahmad." Then they said: "We are going to ask you a question. If you answer it correctly, we shall embrace Islam." He said: "Go ahead and ask." They asked: "Which is the greatest witness in the Book of Allah?" The verse of 'shahada' (witness)* was revealed as an answer to this question. He recited it for them. Both of them embraced Islam immediately.
* aayat # 18-19 of Surah aal-e-Imran. The aayat and their meaning can be seen here http://quran.com/3/18-19
* aayat # 18-19 of Surah aal-e-Imran. The aayat and their meaning can be seen here http://quran.com/3/18-19