It is not clear whether the structure was buit by Babur or not but there existed the deity.
Justice Bobde questions when was the Mosque first called Babri Masjid?
Vaidyanatha-It was called Babri Masjid in the 19th Century.
Justice Bobde-Has it been mentioned in the Baburnama?
Vaidyanathan-No Mylord,
Several years later the Shia’s in an SLP were in favour of giving the disputed site to the Sunni’s.
The Shia’s made the assertion that the Mosque was not constructed after the destruction of any temple.”