Sunan Ibn Majah, Book 1, Hadith 64 (Ibn Majah 330)

Salim narrated from his father that:

The Prophet forbade praying in the middle of the road, or defecating there, or urinating.