I offered two rak'ahs of prayer before the Maghrib prayer (i.e. obligatory) during the time of the Messenger of Allah (ﷺ). I (narrator al-Mukhtar b. Fulful) asked Anas: Did the Messenger of Allah (ﷺ) se you ? He replied: Yes, but he neither commanded us nor forbade us (to do so).
Sunan Abi Dawud Book 5, Hadith 33